結果

問題 No.601 Midpoint Erase
ユーザー dazy
提出日時 2017-12-01 00:39:55
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 801 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 54,264 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-23 03:13:31
合計ジャッジ時間 1,608 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

#define fastcin {\
    cin.tie(0);\
    ios::sync_with_stdio(false);\
}
#define rep(i, a, b) for(int i = a; i < b; i++)
#define REP(i, a) for(int i = 0; i < a; i++)
#define scan(x) cin >> x
#define print(x) cout << x << "\n"

int main() {
    fastcin;
    int N; scan(N);
    int s[N];
    long x[N], y[N];
    int count[4] = {};
    int ans = 0;
    REP(i, N) {
        cin >> x[i] >> y[i];
        if (x[i]%2==0) {
            if (y[i]%2==0) s[i] = 0;
            else s[i] = 1;
        } else {
            if (y[i]%2==0) s[i] = 2;
            else s[i] = 3;
        }
        if (count[s[i]] > 0) {
            count[s[i]]--;
            ans++;
        } else count[s[i]]++;
    }

    if (ans%2!=0) print("Alice");
    else print("Bob");

    return 0;
}
0