結果

問題 No.1716 Bonus Nim
ユーザー SSRSSSRS
提出日時 2021-10-22 23:01:29
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 444 ms / 2,000 ms
コード長 498 bytes
コンパイル時間 1,832 ms
コンパイル使用メモリ 175,620 KB
実行使用メモリ 12,840 KB
最終ジャッジ日時 2023-10-24 14:33:38
合計ジャッジ時間 9,619 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,368 KB
testcase_01 AC 2 ms
4,368 KB
testcase_02 AC 2 ms
4,368 KB
testcase_03 AC 2 ms
4,368 KB
testcase_04 AC 330 ms
7,400 KB
testcase_05 AC 339 ms
8,932 KB
testcase_06 AC 334 ms
8,068 KB
testcase_07 AC 344 ms
8,168 KB
testcase_08 AC 335 ms
8,040 KB
testcase_09 AC 339 ms
8,348 KB
testcase_10 AC 334 ms
8,248 KB
testcase_11 AC 333 ms
7,556 KB
testcase_12 AC 340 ms
7,644 KB
testcase_13 AC 376 ms
9,152 KB
testcase_14 AC 334 ms
6,416 KB
testcase_15 AC 379 ms
4,368 KB
testcase_16 AC 2 ms
4,368 KB
testcase_17 AC 2 ms
4,368 KB
testcase_18 AC 2 ms
4,368 KB
testcase_19 AC 2 ms
4,368 KB
testcase_20 AC 2 ms
4,368 KB
testcase_21 AC 2 ms
4,368 KB
testcase_22 AC 414 ms
11,516 KB
testcase_23 AC 406 ms
11,780 KB
testcase_24 AC 416 ms
12,356 KB
testcase_25 AC 444 ms
12,420 KB
testcase_26 AC 400 ms
12,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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