当前位置:网站首页>Game theory acwing 892. Step Nim game
Game theory acwing 892. Step Nim game
2022-07-27 11:18:00 【T_ Y_ F666】
Game theory AcWing 892. steps -Nim game
Original link
Algorithm tags
Math knowledge Game theory Nim game
Ideas

Code
#include<bits/stdc++.h>
#define int long long
#define abs fabs
#define rep(i, a, b) for(int i=a;i<b;++i)
#define Rep(i, a, b) for(int i=a;i>=b;--i)
using namespace std;
const int N = 100005;
int a[N], st[N], s[N], cnt;
inline int read(){
int s=0,w=1;
char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
return s*w;
}
void put(int x) {
if(x<0) putchar('-'),x=-x;
if(x>=10) put(x/10);
putchar(x%10^48);
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n=read();
int ans=0;
rep(i, 0, n){
a[i]=read();
if(!(i%2)){
ans^=a[i];
}
}
if(ans){
puts("Yes");
}else{
puts("No");
}
}
Originality is not easy.
Reprint please indicate the source
If it helps you Don't forget to praise and support 
边栏推荐
- Derive the detailed expansion of STO double center kinetic energy integral
- 【着色器实现Shake随机摇动效果_Shader效果第十篇】
- A verification test of the relationship between iteration number and entropy
- Openatom openharmony sub forum, see you today at 14:00! Wonderful release of memorabilia attached
- Longest ascending subsequence model acwing 1010. Interceptor missile
- Gaussian elimination acwing 883. solving linear equations with Gaussian elimination
- 15th largest value of data flow
- What is the issuing price of NFT (Interpretation of NFT and establishment of NFT world outlook)
- Data assets are king. How to analyze the relationship between enterprise digital transformation and data asset management?
- Use of beautifulsoup
猜你喜欢

Wilderness search --- search iterations

Digital triangle model acwing 275. pass note

Yonbuilder enables innovation, and the "golden keyboard Award" of the fourth UFIDA developer competition is open!

Internal and external troubles of digital collection NFT "boring ape" bayc

Cancer DDD

Data assets are king. How to analyze the relationship between enterprise digital transformation and data asset management?

高斯消元 AcWing 883. 高斯消元解线性方程组

The influence of the number of non-zero values in the picture on Classification

Derive the detailed expansion of STO double center kinetic energy integral

最长上升子序列模型 AcWing 272. 最长公共上升子序列
随机推荐
Redis+caffeine two-level cache enables smooth access speed
Real time development platform construction practice, in-depth release of real-time data value - 04 live broadcast review
Thank you for your likes and attention
最长上升子序列模型 AcWing 1017. 怪盗基德的滑翔翼
11 wrong set
Gaussian elimination acwing 883. solving linear equations with Gaussian elimination
深析C语言的灵魂 -- 指针
Regular form form judgment
Wilderness search --- search iterations
14 check whether integers and their multiples exist
容斥原理 AcWing 890. 能被整除的数
IMG SRC is empty or SRC does not exist, and the picture has a white border
How to build a real-time development platform to deeply release the value of enterprise real-time data?
Object array de duplication
背包模型 AcWing 1024. 装箱问题
数字三角形模型 AcWing 1027. 方格取数
力扣——10. 正则表达式匹配
Luogu p3052 [usaco12mar]cows in a skyscraper G
洛谷 P3052 [USACO12MAR]Cows in a Skyscraper G
树形DP AcWing 285. 没有上司的舞会