結果
| 問題 |
No.1716 Bonus Nim
|
| コンテスト | |
| ユーザー |
hotman78
|
| 提出日時 | 2021-11-11 14:15:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 457 bytes |
| コンパイル時間 | 2,438 ms |
| コンパイル使用メモリ | 194,068 KB |
| 最終ジャッジ日時 | 2025-01-25 15:20:01 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 WA * 23 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
vector<int>v(n);
for(int i=0;i<n;++i)cin>>v[i];
bool ok=0;
if(n%2)ok=1;
else{
if(count(v.begin(),v.end(),1)==0||count(v.begin(),v.end(),1)==n){
ok=0;
}else{
ok=1;
}
}
cout<<(ok?"Alice":"Bob")<<endl;
}
}
hotman78