結果

問題 No.2059 Odd Move Nim
ユーザー kens
提出日時 2022-08-26 23:03:30
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 2,049 ms
コンパイル使用メモリ 194,368 KB
最終ジャッジ日時 2025-01-31 05:30:23
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)n; i++)
using ll = long long;

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i,n) cin >> a[i];
  int cur = 0;
  for(int i = 1; i < n; i += 2) cur ^= a[i];
  cout << (cur ? "Alice" : "Bob") << endl;
  return 0;
}
0