結果

問題 No.601 Midpoint Erase
ユーザー nanae
提出日時 2017-11-08 19:17:06
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 219 ms / 2,000 ms
コード長 478 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 26,672 KB
最終ジャッジ日時 2024-12-23 03:06:27
合計ジャッジ時間 3,180 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def solve():
    n = int(sys.stdin.readline())

    assert 2 <= n <= 10**6

    cnt = [0] * 4
    xy = set()

    for i in range(n):
        x, y = map(int, sys.stdin.readline().split())
        cnt[((x & 1) << 1) ^ (y & 1)] += 1

        assert (x, y) not in xy
        xy.add((x, y))

    turn = 0

    for i in range(4):
        turn += (cnt[i] // 2)

    if turn & 1:
        print('Alice')
    else:
        print('Bob')


if __name__ == '__main__':
    solve()
0