結果

問題 No.1716 Bonus Nim
ユーザー se1ka2se1ka2
提出日時 2021-10-22 22:41:03
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 433 ms / 2,000 ms
コード長 461 bytes
コンパイル時間 677 ms
コンパイル使用メモリ 75,684 KB
実行使用メモリ 12,148 KB
最終ジャッジ日時 2023-10-24 14:02:06
合計ジャッジ時間 8,578 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 344 ms
7,056 KB
testcase_05 AC 345 ms
8,168 KB
testcase_06 AC 342 ms
7,748 KB
testcase_07 AC 353 ms
7,512 KB
testcase_08 AC 342 ms
7,752 KB
testcase_09 AC 348 ms
7,992 KB
testcase_10 AC 344 ms
7,876 KB
testcase_11 AC 342 ms
7,280 KB
testcase_12 AC 349 ms
7,464 KB
testcase_13 AC 377 ms
8,356 KB
testcase_14 AC 342 ms
6,012 KB
testcase_15 AC 371 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 2 ms
4,348 KB
testcase_19 AC 2 ms
4,348 KB
testcase_20 AC 2 ms
4,348 KB
testcase_21 AC 2 ms
4,348 KB
testcase_22 AC 429 ms
11,188 KB
testcase_23 AC 428 ms
11,568 KB
testcase_24 AC 414 ms
11,936 KB
testcase_25 AC 433 ms
12,148 KB
testcase_26 AC 394 ms
12,124 KB
権限があれば一括ダウンロードができます

ソースコード

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