結果

問題 No.601 Midpoint Erase
ユーザー ふーらくたるふーらくたる
提出日時 2017-12-01 05:47:54
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 520 bytes
コンパイル時間 626 ms
コンパイル使用メモリ 68,652 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 03:16:47
合計ジャッジ時間 2,061 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <utility>
#include <map>
using namespace std;

int main() {
    int N;
    cin >> N;

    map<pair<int, int>, int> mp;
    for (int i = 0; i < N; i++) {
        int x, y;
        cin >> x >> y;

        mp[make_pair(abs(x) % 2, abs(y) % 2)]++;
    }

    int cnt = 0;
    for (int x = 0; x < 2; x++) {
        for (int y = 0; y < 2; y++) {
            cnt += mp[make_pair(x, y)] / 2;
        }
    }

    if (cnt % 2) cout << "Alice" << endl;
    else cout << "Bob" << endl;

    return 0;
}
0