結果
| 問題 |
No.1716 Bonus Nim
|
| コンテスト | |
| ユーザー |
pockyny
|
| 提出日時 | 2021-10-22 23:32:10 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 643 ms / 2,000 ms |
| コード長 | 488 bytes |
| コンパイル時間 | 866 ms |
| コンパイル使用メモリ | 76,672 KB |
| 最終ジャッジ日時 | 2025-01-25 04:26:07 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 26 |
ソースコード
#include <iostream>
#include <map>
using namespace std;
int main(){
int t; cin >> t;
while(t){
t--;
int i,n; cin >> n;
map<int,int> mp;
for(i=0;i<n;i++){
int a; cin >> a; mp[a]++;
}
if(n&1){
cout << "Alice\n";
continue;
}
bool f = true;
for(auto x:mp){
if(x.second&1) f = false;
}
if(f) cout << "Bob\n";
else cout << "Alice\n";
}
}
pockyny