結果
問題 | No.601 Midpoint Erase |
ユーザー |
|
提出日時 | 2019-10-07 12:56:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 77 ms / 2,000 ms |
コード長 | 571 bytes |
コンパイル時間 | 747 ms |
コンパイル使用メモリ | 92,836 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 22:34:31 |
合計ジャッジ時間 | 3,104 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
#include<iostream>#include<algorithm>#include<cmath>#include<iomanip>#include<vector>#include<map>#include<queue>using namespace std;typedef long long ll;const int MOD=1e9+7;int main() {int n,x,y,a[4]={},ans=0;cin >> n;for(int i=0; i<n; i++) {cin >> x >> y;if(x%2==0&&y%2==0) {a[0]++;}else if(x%2==0&&y%2==1) {a[1]++;}else if(x%2==1&&y%2==0) {a[2]++;}else if(x%2==1&&y%2==1) {a[3]++;}}for(int i=0; i<4; i++) {ans+=a[i]/2;}cout << (ans%2?"Alice":"Bob") << endl;}