|
|
At the beginning of the turn, does player choose only among the parallelepipeds generated during the last turn, or among all of them, including the previous turns? For example, K=1, n1=11 First player dissects it at x=2. We have now two parallelepipeds, of size 1 and 9. Second player chooses the one of size 9, and dissects it at x=3, generating parallelepipeds of size 2 and 6. Does first player have choice between 1, 2 and 6? Or only 2 and 6? When K = 1 , removed a single cell from line? If that right, K = 1 very simple case: n1 % 2 = 0 lost, n%2 =1 win position (with index=1). For K= 2, seems there only 2x2 rectangle Bob is win :) same code visul C++ 2017 0.249s G++7.1 2.5s What do you mean by: " It is required that at least one of those small parts has edge lengths that are pairwise relatively prime with the corresponding edge lengths of the original parallelepiped. " and is it allowed to make the following cut in the second example ? 1 1 3 If we have such a cut (which I think is correct) then we will have two equal cubes(2 3 2) (i.e. this move is correct and the first player can win by it), or I am wrong?
Rostislav Thank's Edited by author 18.02.2007 16:51 Edited by author 18.02.2007 17:24 Please answer :) because I am can't get it. My AC program outputs 1 1 3. Sample output is incorrect. Yes, the rigth answer is 1 1 3. If one of the dimensions becomes one, do we continue with an (k-1)-dimensional problem, or does every cut remove all blocks? In either case, can someone give me some sample I/O, since I currently get WA #3 (assuming the first two are the sample cases). If one of the dimensions becomes one, do we continue with an (k-1)-dimensional problem, or does every cut remove all blocks? Second way, k is constant during computations. Finally, some tests: 2 11 12 3 6 7 8 4 5 6 7 8 and answers: 1 4 1 1 1 2 4 1 1 1 2 4 Thanks, I've found my stupid error (using a global variable in an recursive function). Now I got TLE on test 4, but I'll work on that later. Consider case K = 1 severally Shouldn't the sample output be 1 1 3 instead of 2 2 3? So, could someone clarify this (maybe someone who got AC:) ?. |
|
|