結果

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

ソースコード

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