結果
| 問題 |
No.601 Midpoint Erase
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-10-21 13:30:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 72 ms / 2,000 ms |
| コード長 | 414 bytes |
| コンパイル時間 | 888 ms |
| コンパイル使用メモリ | 65,292 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-19 03:22:51 |
| 合計ジャッジ時間 | 2,289 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
#include <iostream>
using namespace std;
int main() {
int N, x, y, sum = 0, tmp[4] = {0};
cin >> N;
for (int i = 0; i < N; ++i) {
cin >> x >> y;
if (x % 2 == 0 && y % 2 == 0) ++tmp[0];
else if (x % 2 == 0 && y % 2) ++tmp[1];
else if (x % 2 && y % 2 == 0) ++tmp[2];
else ++tmp[3];
}
for (int i = 0; i < 4; ++i) sum += tmp[i] / 2;
if (sum % 2) cout << "Alice";
else cout << "Bob";
}