首页 > 其他分享 >A. Amateur Chess Players【GDUT 2022 grade Qualifying # 2】

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

时间:2023-03-08 11:22:05浏览次数:49  
标签:QQ GDUT Amateur grade Cuber remove pieces 棋子 they

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

标签:QQ,GDUT,Amateur,grade,Cuber,remove,pieces,棋子,they
From: https://www.cnblogs.com/J-12045/p/17191343.html

相关文章

  • D. Hard Tasks【GDUT 2022 grade Qualifying】
    D.HardTasks原题链接题意给出一个数n,询问1-n中有多少对组合(三个数)相加不需要进位思路1-10有{0,1,2},{1,2,3},{2,3,4}共3对10-20有{10,11,12},{11,12,13},{12,13,......
  • C Make it in a Line【GDUT 2022 grade Qualifying #1】
    C MakeitinaLine原题链接题意求出三维n×n×n中的满足条件的总数题解只看底面一个面n个点在一个平面内,一共有n个面:\(n(2n+2)\)(行列+对角线)n个点在垂直底......
  • A Calculus【GDUT 2022 grade Qualifying #1】
    A CalculusChipmunkisamathgenius,andheisextraordinarilygoodatcalculus.NowChipmunkgivesyouaformulaandasksyoutocalculateitinoneminute,......
  • H - 线段树 1【GDUT_22级寒假训练专题五】
    H-线段树1原题链接题意区间修改区间查询线段树简介线段树是一颗二叉树,他能通过树的分支将一块区间划分为数个单元区间,每个单元区间对应线段树中的一个叶结点。如......
  • upgrade or replace
    juniperupgrade1.Login:2.MountUSB:ForEX:mount-tmsdosfs/dev/da1s1/mntmount_msdosfs/dev/da1s1/mntForQFX:mount-tmsdosfs/dev/da0s1/mnt3.Copy......
  • B - Fedya and Maths 【GDUT_22级寒假训练专题五】
    B-FedyaandMaths原题链接思路找到规律发现答案以4为周期循环如果被4整除那么答案则为4,否则答案为0疑难一个长度为\(10^5\)的数怎么对4进行取模运算?分别取模如:......
  • F - 树状数组 2【GDUT_22级寒假训练专题五】
    F-树状数组2原题链接思路在树状数组1中我们可以得知单点修改,区间查询(区间和)对原数组进行单点修改,对区间和进行树状数组维护利用差分和前缀和我们可以推导出区......
  • E - 树状数组 1【GDUT_22级寒假训练专题五】
    E-树状数组1原题链接题意已知一个数列,你需要进行下面两种操作:将某一个数加上\(x\)求出某区间每一个数的和lowbit函数定义一个函数\(f=lowbit(x)\),这个函......
  • B - 滑雪【2022GDUT寒假集训-简单DP】
    B-滑雪原题链接思路\(定义f(i,j)为从坐标(i,j)出发的最大值\)\(状态转移方程f(i,j)=max(f(i+dx[k],j+dy[k]))\)\(答案为max(f(1,1),f(1,2),...,f(n,m))\)注意......
  • A - 摆花【2022GDUT寒假集训-简单DP】
    摆花原题链接思路\(\text{有}n\text{个数}\left(c_{1},c_{2},\ldots,c_{n}\right),0\leqslantc_{i}\leqslanta_{i}\text{,求有多少种方案数使}\s......