A. Amateur Chess Players【GDUT 2022 grade Qualifying # 2】

A. Amateur Chess Players

原题链接
image
image

题意

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";
}

posted @   Keith-  阅读(16)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】
点击右上角即可分享
微信分享提示