結果
| 問題 | No.601 Midpoint Erase | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-12-01 10:41:48 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 22 ms / 2,000 ms | 
| コード長 | 417 bytes | 
| コンパイル時間 | 159 ms | 
| コンパイル使用メモリ | 28,800 KB | 
| 最終ジャッジ日時 | 2025-01-05 04:34:33 | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 23 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |   scanf("%d", &n);
      |   ~~~~~^~~~~~~~~~
main.cpp:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |     scanf("%d%d", &x, &y);
      |     ~~~~~^~~~~~~~~~~~~~~~
            
            ソースコード
#include <cstdio>
#include <cstring>
int main() {
  int cnt[2][2];
  memset(cnt, 0, sizeof(cnt));
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    cnt[x & 1][y & 1]++;
  }
  int turns = 0;
  for (int i = 0; i < 2; ++i) {
    for (int j = 0; j < 2; ++j) {
      turns += cnt[i][j] / 2;
    }
  }
  if (turns & 1) puts("Alice");
  else puts("Bob");
  return 0;
}
            
            
            
        