A. Amateur Chess Players
题意
At the beginning, Cuber QQ, who has the white pieces, and Quber CC, who has the black pieces, place some of their pieces on the chessboard. Then they start to remove those pieces by turn. Cuber QQ moves first. In each turn, they must remove【移除】 at least one of their own pieces (Cuber QQ can only remove white and Quber CC can only remove black).
The one who fails to make a move loses the game.
Now Cuber QQ and Quber CC are both desperate to win the game. So they will do it smartly and make optimal decisions. Who do you think will win the game, eventually?
简述:依次取棋子,谁先取完谁输
Two or more pieces can be removed together in one turn if and only if these pieces are collinear【共线的】 on the chessboard, meaning they should lie in the same line. Note that this line does NOT have to be in horizontal or vertical or diagnoal direction.
简述:如果棋子在同一条线上,则可以同时取多个棋子【干扰信息】
由于双方都想赢且谁先取完谁输,那么双方都尽可能少地取棋子,也就是取一颗棋子,意思就是取多个棋子的是没有意义的
而且开始国际象棋的背景也只是来唬人的,规则是原题自拟的
代码
点击查看代码
void solve(){
cin >> n;
for(int i = 1; i <= n; i ++ ){
string s;
cin >> s;
}
cin >> m;
for(int i = 1; i <= m; i ++ ){
string s;
cin >> s;
}
if(n > m)cout << "Cuber QQ";
else cout << "Quber CC";
}