結果

問題 No.601 Midpoint Erase
ユーザー dazydazy
提出日時 2017-12-01 00:31:05
言語 C++11
(gcc 13.3.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 865 bytes
コンパイル時間 482 ms
コンパイル使用メモリ 56,540 KB
実行使用メモリ 6,816 KB
最終ジャッジ日時 2024-11-27 15:36:49
合計ジャッジ時間 10,962 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

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 = 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;
        }
    }
    REP(i, N-1) {
        rep(j, i+1, N) {
            if (s[j]!=-1 && s[i]==s[j]) {
                s[j] = -1;
                count++;
                break;
            }
        }
    }

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

    return 0;
}
0