标签:out i++ names AC cin code str long stream
#include<iostream>
using namespace std;
int main()
{
int n,i;
long long sum,x;
cin>>n;
sum=0;
for(i=1;i<=n;i++){
cin>>x;
sum=sum+x-1;
if(sum%2){
cout<<"1"<<endl;
sum=1;
}
else{
cout<<"2"<<endl;
sum=0;
}
}
return 0;
}||偶数就是后手赢,奇数就是先手赢
标签:out i++ names AC cin code str long stream
原文地址:https://www.cnblogs.com/wangzhelin/p/9151985.html