In addition to the disclaimer, one thing which worried me was the N <= 1000 in the large problem specification. I got a quite elegant fast solution and a so low bound was really surprising.
My solution for 4 was quite efficient in design (and very simple). I was able to be very inefficient in the rough implementation (being lazy and copying arrays, reading the entire input file at once and breaking it up into lines in memory) and still, using JS, solve the large set in only a few milliseconds.
That should probably be a few orders of magnitude higher to realistically make the time constraint remotely difficult.
This was a fun problem to think about, though. Naomi is such a cheater.
Comments
The 4th is definitively the funniest.
In addition to the disclaimer, one thing which worried me was the N <= 1000 in the large problem specification. I got a quite elegant fast solution and a so low bound was really surprising.
My solution for 4 was quite efficient in design (and very simple). I was able to be very inefficient in the rough implementation (being lazy and copying arrays, reading the entire input file at once and breaking it up into lines in memory) and still, using JS, solve the large set in only a few milliseconds.
That should probably be a few orders of magnitude higher to realistically make the time constraint remotely difficult.
This was a fun problem to think about, though. Naomi is such a cheater.
Please don't give potentially useful hints until the end of competition