結果
| 問題 |
No.2059 Odd Move Nim
|
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2022-08-29 10:47:24 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 479 bytes |
| コンパイル時間 | 307 ms |
| コンパイル使用メモリ | 41,536 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-06 09:22:12 |
| 合計ジャッジ時間 | 2,263 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 2059.cc: No.2059 Odd Move Nim - yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int MAX_N = 200000;
/* typedef */
/* global variables */
int as[MAX_N];
/* subroutines */
/* main */
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++) scanf("%d", as + i);
int x = 0;
for (int i = 1; i < n; i += 2) x ^= as[i];
if (x) puts("Alice");
else puts("Bob");
return 0;
}
tnakao0123