当前位置:网站首页>Divide by Zero 2017 and Codeforces Round #399 (Div. 1 + Div. 2, combined) E. Game of Stones

Divide by Zero 2017 and Codeforces Round #399 (Div. 1 + Div. 2, combined) E. Game of Stones

2022-06-09 05:56:00 No toast

#include <iostream> 
#include <stdio.h> 
#include <string.h> 
#include <stack> 
#include <queue> 
#include <map> 
#include <set> 
#include <vector> 
#include <math.h> 
#include <bitset> 
#include <algorithm> 

using namespace std;

#define X first
#define Y second
#define eps 1e-2
#define gcd __gcd
#define pb push_back
#define PI acos(-1.0)
#define lowbit(x) (x)&(-x)
#define bug printf("!!!!!\n");
#define mem(x,y) memset(x,y,sizeof(x))

typedef long long LL;
typedef long double LD;
typedef pair<int,int> pii;
typedef unsigned long long uLL;

const int N = 1e5+2;
const int INF  = 1<<30;
const int mod  = 1e9+7;

int t,n;
void solve(){
    
    cin>>t;
    int res=0;
    while(t--){
    
      cin>>n;int i=0;
      for(i=0;(i+1)*i/2<=n;i++){
    }
      res^=(i-1);
    }
    cout<<(res!=0?"NO":"YES")<<endl;
    return;
}

int main()
{
    
// freopen("in.txt","r",stdin);
// freopen("out.txt","w",stdout);
// ios::sync_with_stdio(false);
    int t = 1;
    //scanf("%d",&t);
    while(t--){
    
    // printf("Case %d: ",cas++);
        solve();
    }
    return 0;
}
原网站

版权声明
本文为[No toast]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206090555059406.html