結果

問題 No.601 Midpoint Erase
ユーザー iqueue02iqueue02
提出日時 2019-11-21 20:52:55
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 592 bytes
コンパイル時間 1,535 ms
コンパイル使用メモリ 167,080 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-19 08:08:34
合計ジャッジ時間 3,102 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 54 ms
5,376 KB
testcase_04 AC 62 ms
5,376 KB
testcase_05 AC 44 ms
5,376 KB
testcase_06 AC 25 ms
5,376 KB
testcase_07 AC 59 ms
5,376 KB
testcase_08 AC 50 ms
5,376 KB
testcase_09 AC 60 ms
5,376 KB
testcase_10 AC 14 ms
5,376 KB
testcase_11 AC 85 ms
5,376 KB
testcase_12 AC 39 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 2 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n);i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef pair<int,int> P;

int main(){
  int n;
  cin >> n;
  vector<P> p1, p2, p3, p4;
  rep(i,n) {
    int x, y;
    cin >> x >> y;
    if (x % 2 == 0) {
      if (y % 2 == 0) p1.push_back({x,y});
      else p2.push_back({x,y});
    } else {
      if (y % 2 == 0) p3.push_back({x,y});
      else p4.push_back({x,y});
    }
  }
  int res = sz(p1) / 2 + sz(p2) / 2 + sz(p3) / 2 + sz(p4) / 2;
  cout << (res & 1 ? "Alice" : "Bob") << endl;
  return 0;
}
0