結果
問題 | No.2059 Odd Move Nim |
ユーザー |
|
提出日時 | 2022-12-13 22:18:38 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 92 ms / 2,000 ms |
コード長 | 290 bytes |
コンパイル時間 | 688 ms |
コンパイル使用メモリ | 67,316 KB |
最終ジャッジ日時 | 2025-02-09 11:07:05 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
#include <iostream> using namespace std; int main() { int n; cin >> n; int a[200005]; for (int i = 0; i < n; i++) { cin >> a[i]; } int x = 0; for (int i = 1; i < n; i += 2) { x ^= a[i]; } cout << (x ? "Alice" : "Bob") << endl; }