結果
問題 | No.601 Midpoint Erase |
ユーザー |
|
提出日時 | 2019-08-18 23:49:45 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 88 ms / 2,000 ms |
コード長 | 473 bytes |
コンパイル時間 | 2,001 ms |
コンパイル使用メモリ | 191,620 KB |
最終ジャッジ日時 | 2025-01-07 14:14:11 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin>>n; int ee,oo,eo,oe; ee=oo=eo=oe=0; for (int i=0;i<n;i++) { int x,y; cin>>x>>y; if (x%2==0) { if (y%2==0) ee++; else eo++; } else { if (y%2==0) oe++; else oo++; } } int cnt=ee/2+oo/2+eo/2+oe/2; if (cnt%2==0) puts("Bob"); else puts("Alice"); return 0; }