結果
| 問題 |
No.601 Midpoint Erase
|
| コンテスト | |
| ユーザー |
creep04
|
| 提出日時 | 2017-12-01 03:06:26 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 2,000 ms |
| コード長 | 535 bytes |
| コンパイル時間 | 1,396 ms |
| コンパイル使用メモリ | 158,608 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 03:16:12 |
| 合計ジャッジ時間 | 2,618 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
//--------------------------------------------------
// odd-odd / odd-even / even-odd / even-even
int n, x, y, pr=0, cnt[4];
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> x >> y;
if (x%2==0) {
if (y%2==0) cnt[3]++;
else cnt[2]++;
}
else {
if (y%2==0) cnt[1]++;
else cnt[0]++;
}
}
for (int i = 0; i < 4; ++i) pr += cnt[i]/2;
if (pr%2==0) cout << "Bob" << endl;
else cout << "Alice" << endl;
}
creep04