結果
| 問題 |
No.2059 Odd Move Nim
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-27 23:26:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 81 ms / 2,000 ms |
| コード長 | 688 bytes |
| コンパイル時間 | 1,519 ms |
| コンパイル使用メモリ | 169,756 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-15 11:09:49 |
| 合計ジャッジ時間 | 3,133 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/dsu>
using namespace std;
using namespace atcoder;
#define SZ(x) (int)(x).size()
#define dout(x) printf("%.10f\n", (double)(x))
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
typedef pair<int, int> P;
typedef pair<long, long> Pl;
typedef vector<vector<int>> vvi;
int main()
{
long N, a;
cin >> N;
long kotae = 0;
for (int i = 0; i < N; i++)
{
cin >> a;
if (i % 2 == 1)
{
kotae = kotae ^ a;
}
}
if (kotae == 0)
{
cout << "Bob" << endl;
}
else
{
cout << "Alice" << endl;
}
return 0;
}