結果

問題 No.1716 Bonus Nim
ユーザー nawawannawawan
提出日時 2021-10-22 23:04:10
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 409 ms / 2,000 ms
コード長 463 bytes
コンパイル時間 2,468 ms
コンパイル使用メモリ 210,072 KB
実行使用メモリ 12,792 KB
最終ジャッジ日時 2023-10-24 14:39:13
合計ジャッジ時間 9,605 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 327 ms
7,356 KB
testcase_05 AC 332 ms
8,884 KB
testcase_06 AC 328 ms
8,024 KB
testcase_07 AC 336 ms
8,120 KB
testcase_08 AC 326 ms
7,996 KB
testcase_09 AC 330 ms
8,304 KB
testcase_10 AC 328 ms
8,204 KB
testcase_11 AC 328 ms
7,512 KB
testcase_12 AC 335 ms
7,600 KB
testcase_13 AC 360 ms
9,104 KB
testcase_14 AC 329 ms
6,368 KB
testcase_15 AC 381 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 1 ms
4,348 KB
testcase_19 AC 2 ms
4,348 KB
testcase_20 AC 2 ms
4,348 KB
testcase_21 AC 1 ms
4,348 KB
testcase_22 AC 385 ms
11,472 KB
testcase_23 AC 390 ms
11,736 KB
testcase_24 AC 387 ms
12,312 KB
testcase_25 AC 409 ms
12,376 KB
testcase_26 AC 375 ms
12,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
    int T;
    cin >> T;
    while(T--){
        int N;
        cin >> N;
        vector<int> A(N);
        for(int i = 0; i < N; i++) cin >> A[i];
        map<int, int> m;
        for(int i = 0; i < N; i++) m[A[i]]++;
        bool f = true;
        for(auto v : m){
            if(v.second % 2 == 1) f = false;
        }
        if(!f) cout << "Alice" << endl;
        else cout << "Bob" << endl;
    }
}
0