結果
問題 | No.601 Midpoint Erase |
ユーザー |
![]() |
提出日時 | 2017-12-01 00:34:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 77 ms / 2,000 ms |
コード長 | 980 bytes |
コンパイル時間 | 594 ms |
コンパイル使用メモリ | 71,420 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-23 03:13:29 |
合計ジャッジ時間 | 2,051 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
#include <iostream> #include <math.h> #include <string> #include <algorithm> #include <vector> #include <iomanip> #define REP(i,n) for(int i=0;i<n;i++) typedef long long ll; using namespace std; int kaijo(int n){ int ans = 1; if (n != 0){ for (int i = 0; i < n; i++){ ans *= (n - i); } } else{ ans = 1; } return ans; } int main(){ int n; int x, y; int cnt = 0; int cnt1 = 0; int cnt2 = 0; int cnt3 = 0; int cnt4 = 0; cin >> n; REP(i, n){ cin >> x >> y; if (x == (x / 2) * 2){ if (y == (y / 2) * 2){ cnt1++; if (cnt1 == 2){ cnt++; cnt1 = 0; } } else{ cnt2++; if (cnt2 == 2){ cnt++; cnt2 = 0; } } } else{ if (y == (y / 2) * 2){ cnt3++; if (cnt3 == 2){ cnt++; cnt3 = 0; } } else{ cnt4++; if (cnt4 == 2){ cnt++; cnt4 = 0; } } } } if (cnt == (cnt / 2) * 2){ cout << "Bob" << endl; } else{ cout << "Alice" << endl; } return 0; }