0%

Problem 933


Problem 933


Paper Cutting

Starting with one piece of integer-sized rectangle paper, two players make moves in turn.
A valid move consists of choosing one piece of paper and cutting it both horizontally and vertically, so that it becomes four pieces of smaller rectangle papers, all of which are integer-sized.
The player that does not have a valid move loses the game.

Let C(w,h) be the number of winning moves for the first player, when the original paper has size w×h. For example, C(5,3)=4, with the four winning moves shown below.

0933_PaperCutting2.jpg

Also write D(W,H)=w=2Wh=2HC(w,h). You are given that D(12,123)=327398.

Find D(123,1234567).


纸张切割

两名玩家在用一张长宽均为整数的矩形纸张玩游戏,两人轮流行动。
在该游戏中,一步有效行动是指,任选一张纸并将其同时水平和垂直切割成四张较小的、长宽均为整数的矩形纸张。
无法进行有效行动的玩家输掉游戏。

C(w,h)为当初始纸张尺寸为w×h时,先手玩家必胜的行动数目。例如,C(5,3)=4,下图展示了四种先手必胜行动。

0933_PaperCutting2.jpg

同时记D(W,H)=w=2Wh=2HC(w,h)。已知D(12,123)=327398

D(123,1234567)


Gitalking ...