问题如下(附链接):Alice和Bob的爱恨情仇
题解代码如下:
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
int n,k;
cin>>n>>k;
int ans=0;
for(int i=0;i<n;i++)
{
int x;
cin>>x;
ans+=x;
}
if(ans%2==1)
cout<<"Alice\n";
else
cout<<"Bob\n";
return 0;
}
标签:cout,int,情仇,Alice,ans,tie,OJ
From: https://blog.csdn.net/2401_87130535/article/details/142152889