I tried coding LeppyR64's dynamic programming method.
If end up with nested loops
loop r=2...k
   for all subsets S of {1...n}
     for all subsets T of S
         best cover S with r squares =
                min(max(cover T with 1 square, cover S-T with r-1 squares)

Alternatively, do a binary search over s asking the question can k squares of 
size s cover the n points.

To answer the question, find all maximal subsets T of {1...n} which can be 
covered by one square of size s. In practice the number of such subsets seem to 
be not much larger than n. Then do a depth first search to see if k of these 
subsets can be found to cover {1...n}.

Total time is something like log2(64000) x 2^n x n x smallish function of n.

Lots of loose ends in the above description. More thoughts welcome.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/4c73508d-4274-43d1-96a4-8354f1b267a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to