結果

問題 No.1716 Bonus Nim
ユーザー se1ka2
提出日時 2021-10-22 22:41:03
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 482 ms / 2,000 ms
コード長 461 bytes
コンパイル時間 618 ms
コンパイル使用メモリ 75,548 KB
実行使用メモリ 11,904 KB
最終ジャッジ日時 2024-09-23 06:23:18
合計ジャッジ時間 9,017 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>
using namespace std;

int main()
{
    int t;
    cin >> t;
    while(t--){
        int n;
        cin >> n;
        map<int, int> mp;
        for(int i = 0; i < n; i++){
            int a;
            cin >> a;
            mp[a]++;
        }
        int c = 0;
        for(auto itr = mp.begin(); itr != mp.end(); itr++) c += itr->second % 2;
        if(c) cout << "Alice" << endl;
        else cout << "Bob" << endl;
    }
}
0