結果
| 問題 | No.601 Midpoint Erase | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-10-21 23:05:03 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 79 ms / 2,000 ms | 
| コード長 | 547 bytes | 
| コンパイル時間 | 1,469 ms | 
| コンパイル使用メモリ | 167,396 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-02 17:52:34 | 
| 合計ジャッジ時間 | 4,084 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 23 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin>>n;
  int cnt[4];
  for (int i=0; i<4; i++) cnt[i] = 0;
  for (int i=0; i<n; i++) {
    int x, y;
    cin>>x>>y;
    if (x % 2 == 0) {
      if (y % 2 == 0) {
        ++cnt[0];
      } else {
        ++cnt[1];
      }
    } else {
      if (y % 2 == 0) {
        ++cnt[2];
      } else {
        ++cnt[3];
      }
    }
  }
  int sum = 0;
  for (int i=0; i<4; i++) sum += cnt[i] / 2;
  if (sum % 2 == 1) {
    cout<<"Alice"<<endl;
  } else {
    cout<<"Bob"<<endl;
  }
}
            
            
            
        