|
|
вернуться в форумLet "n + 1" is the number of turns which were made during the game. Then to make the make second player winner the set of inequalities should be correct: - |k - n <= L < k - nL > 0 | n mod 2 = 1 - So our task is to find max odd n, where k / n > k - n > 0 I wrote the program which solves this set of inequalities but got an error on the test #3. I argued on another: Let k is max how many it is possible to take, then the second can make so each time by both would be taken k+1 example: k=5 1-3 2-3 1-5 2-1 And in a result it is necessary to find min k (n mod (k+1)=0) It is easy Good luck!!! I have tried to write such prog. But it gives WA#11. |
|
|