結果
問題 | No.601 Midpoint Erase |
ユーザー |
![]() |
提出日時 | 2017-12-02 17:12:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 83 ms / 2,000 ms |
コード長 | 523 bytes |
コンパイル時間 | 1,356 ms |
コンパイル使用メモリ | 157,532 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 03:26:59 |
合計ジャッジ時間 | 2,881 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){int N;int cnt[4] = {};cin >> N;while(N--) {int x, y;cin >> x >> y;if(x % 2 == 0) {if(y % 2 == 0) cnt[0]++;else cnt[1]++;} else{if(y % 2 == 0) cnt[2]++;else cnt[3]++;}}if((cnt[0] / 2 + cnt[1] / 2 + cnt[2] / 2 + cnt[3] / 2) % 2 == 0) {cout << "Bob" << endl;} else {cout << "Alice" << endl;}return (0);}