結果

問題 No.601 Midpoint Erase
ユーザー はむ吉🐹はむ吉🐹
提出日時 2017-12-01 22:50:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 307 ms / 2,000 ms
コード長 399 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 10,672 KB
実行使用メモリ 21,208 KB
最終ジャッジ日時 2023-08-24 18:42:32
合計ジャッジ時間 3,360 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,620 KB
testcase_01 AC 18 ms
8,516 KB
testcase_02 AC 17 ms
8,504 KB
testcase_03 AC 198 ms
16,608 KB
testcase_04 AC 225 ms
17,908 KB
testcase_05 AC 163 ms
15,004 KB
testcase_06 AC 98 ms
12,268 KB
testcase_07 AC 217 ms
17,380 KB
testcase_08 AC 186 ms
16,112 KB
testcase_09 AC 218 ms
17,696 KB
testcase_10 AC 61 ms
10,576 KB
testcase_11 AC 307 ms
21,208 KB
testcase_12 AC 147 ms
14,368 KB
testcase_13 AC 17 ms
8,448 KB
testcase_14 AC 17 ms
8,504 KB
testcase_15 AC 17 ms
8,620 KB
testcase_16 AC 18 ms
8,624 KB
testcase_17 AC 18 ms
8,508 KB
testcase_18 AC 18 ms
8,512 KB
testcase_19 AC 18 ms
8,512 KB
testcase_20 AC 18 ms
8,468 KB
testcase_21 AC 18 ms
8,552 KB
testcase_22 AC 18 ms
8,644 KB
testcase_23 AC 18 ms
8,552 KB
testcase_24 AC 18 ms
8,624 KB
testcase_25 AC 18 ms
8,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3

import collections


def can_alice_win(ps):
    ctr = collections.Counter(2 * (x % 2) + (y % 2) for x, y in ps)
    res = sum(v // 2 for v in ctr.values()) % 2
    return bool(res)


def main():
    n = int(input())
    ps = [tuple(int(z) for z in input().split()) for _ in range(n)]
    print("Alice" if can_alice_win(ps) else "Bob")


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