結果
| 問題 |
No.601 Midpoint Erase
|
| コンテスト | |
| ユーザー |
iqueue02
|
| 提出日時 | 2019-11-21 20:52:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 81 ms / 2,000 ms |
| コード長 | 592 bytes |
| コンパイル時間 | 1,741 ms |
| コンパイル使用メモリ | 170,504 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-11 00:45:03 |
| 合計ジャッジ時間 | 3,827 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
#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;
}
iqueue02