結果

問題 No.601 Midpoint Erase
ユーザー Hydrogen1008
提出日時 2020-10-07 18:53:10
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 524 bytes
コンパイル時間 1,798 ms
コンパイル使用メモリ 168,660 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-20 03:30:51
合計ジャッジ時間 3,857 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;


int main() {
    
int N;
int OO=0;
int OE=0;
int EO=0;
int EE=0;

cin >> N;
vector<int>X(N);
vector<int>Y(N);
for(int i=0;i<N;i++){
    cin >> X.at(i) >> Y.at(i);
    if(X.at(i)%2==1&&Y.at(i)%2==1){
        OO++;
    }
    if(X.at(i)%2==1&&Y.at(i)%2==0){
        OE++;
    }
    if(X.at(i)%2==0&&Y.at(i)%2==1){
        EO++;
    }
    if(X.at(i)%2==0&&Y.at(i)%2==0){
        EE++;
    }
}

if((OO/2+OE/2+EO/2+EE/2)%2==1){
    cout << "Alice";
}
else{
    cout << "Bob";
}


}
0