Solutions:
A:
Solution Notes: If there were no coupon, this problem would be solved by "greedily" using gifts
in increasing order of P+S values (since we want to pack in as many gifts as possible befo
Solutions:
A:
Solution Notes: We can calculate K by taking the total number of hay bales and dividing by N.
Now that we know the target height K of each pile, let X be the total number of hay bales si
Solutions:
A:
Solution Notes: This problem is not too hard if we make the observation that 17N = 16N + N,
and in binary 16N is just the binary representation of N followed by four digits of 0 (that is
Solutions:
A:
Solution Notes: Perhaps the easiest way to solve this problem is to first sort the knot locations
and then build an array of differences between successive locations. For example, the lo
Solutions:
A:
Solution Notes: This problem can be solved by "brute force", by simply trying to remove each
possible cow ID from the line, checking after each one whether it gives the best answer (the
Solutions:
A:
Solution Notes: We solve this problem by "brute force". Since we need to change direction
exactly once at each cow (many students seem to have overlooked this condition!) it suffices to