結果
| 問題 |
No.601 Midpoint Erase
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-20 13:18:10 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 79 ms / 2,000 ms |
| コード長 | 590 bytes |
| コンパイル時間 | 638 ms |
| コンパイル使用メモリ | 68,780 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-25 08:53:29 |
| 合計ジャッジ時間 | 2,614 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
#include<iostream>
#include<vector>
using namespace std;
struct Point
{
int x, y;
};
int main() {
int n = 0;
int bunrui[4] = {0,0,0,0};
cin >> n;
for (int i = 0;i < n;i++) {
int x, y;
cin >> x >> y;
if (x % 2 != 0 && y % 2 != 0) bunrui[0]++;
else if (x % 2 == 0 && y % 2 != 0)bunrui[1]++;
else if (x % 2 == 0 && y % 2 == 0)bunrui[2]++;
else bunrui[3]++;
}
int sum = 0;
for (int i = 0;i < 4;i++) {
if (bunrui[i] >= 2)bunrui[i] /=2;
else bunrui[i] = 0;
sum += bunrui[i];
}
if (sum % 2 != 0)cout << "Alice" << endl;
else cout << "Bob" << endl;
return 0;
}