June CookOff Contest Problem Editorials |
Problem Tester for the June Cook-off was Rajiv Kumar
SINSUMQ (written by Anton Lunyov)



Problem Setter Solution
Problem Tester Solution
ARITHPR (written by Anton Lunyov)


Problem Setter Solution
Problem Tester Solution
DPOWPERM (written by Anton Lunyov)


Problem Setter Solution
Problem Tester Solution
KNIGHTMV (written by Anton Lunyov)
You just simply need to check that string has the length 5, 1st and 4th symbols are in the range 'a'..'h', 2nd and 5th are in the range '1'..'8', 3rd symbol is '-'. After that you need to check is this a correct knight move which is easy exercise. Also you should be careful with spaces. If you use C++ and start your program with something like this scanf(“%d\n”,&TST) then you get wrong answer because the first string in the test contains only spaces and using this command you simply skip it and the second one starts with one space followed by the correct string. Using this command you skip this first space and analyze the string as correct however it's not.
Problem Setter Solution
Problem Tester Solution
SUPERPLN (written by Anton Lunyov)
At each step Dunno is in some city at some time. If Roly-Poly lives in this city and the start time of the birthday party is not less than the time when Dunno get this city then the answer is "Yes". Otherwise you need to find the closest flight from this city for the given time. If there is no flights in that city after this moment of time then the answer is "No" because Dunno will be stuck in that city forever. If he have already use the closest flight then the answer is also "No" because he will flight forever using the same sequence of flights and never gets the party. Otherwise you should use this flight, mark it as used, change your city and time to the corresponding ones and continue this procedure. Obviously we will use each flight at most once so we will have in total no more than N steps. The closest flight can be found using binary search. For example you can sort all flights by the city of arrival and then by the time of arrival and use binary search for such array. So the overall time complexity is O(N log N).
Problem Setter Solution
Problem Tester Solution
Comments


For problem SINSUMQ. It can
For SUPERPLN, what would be
@pratik , that depends on
So much maths... :(
For problem SUPERPLN. We can
@pratik If n=0 then the
sir in problem correctness of
sir please ans my question