結果

問題 No.601 Midpoint Erase
ユーザー mitsuomitsuo
提出日時 2017-12-31 21:56:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 427 ms / 2,000 ms
コード長 497 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 10,888 KB
実行使用メモリ 27,340 KB
最終ジャッジ日時 2023-08-24 18:51:49
合計ジャッジ時間 4,261 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,508 KB
testcase_01 AC 18 ms
8,572 KB
testcase_02 AC 18 ms
8,600 KB
testcase_03 AC 260 ms
20,636 KB
testcase_04 AC 292 ms
22,260 KB
testcase_05 AC 213 ms
18,236 KB
testcase_06 AC 126 ms
13,788 KB
testcase_07 AC 279 ms
21,420 KB
testcase_08 AC 241 ms
19,548 KB
testcase_09 AC 286 ms
21,936 KB
testcase_10 AC 77 ms
11,096 KB
testcase_11 AC 427 ms
27,340 KB
testcase_12 AC 194 ms
17,064 KB
testcase_13 AC 19 ms
8,588 KB
testcase_14 AC 18 ms
8,568 KB
testcase_15 AC 18 ms
8,464 KB
testcase_16 AC 18 ms
8,552 KB
testcase_17 AC 18 ms
8,536 KB
testcase_18 AC 19 ms
8,464 KB
testcase_19 AC 19 ms
8,492 KB
testcase_20 AC 18 ms
8,532 KB
testcase_21 AC 18 ms
8,572 KB
testcase_22 AC 19 ms
8,508 KB
testcase_23 AC 19 ms
8,568 KB
testcase_24 AC 19 ms
8,596 KB
testcase_25 AC 19 ms
8,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

def solve(A, data):
    counter = collections.Counter()

    for d in data:
        t = ("e" if d[0] % 2 == 0 else "o") + ("e" if d[1] % 2 == 0 else "o")
        counter.update([t])

    availcount = 0
    for v in counter.values():
        availcount += v // 2

    return "Bob" if availcount % 2 == 0 else "Alice"


if __name__ == '__main__':
    N = (int)(input())
    d = []
    for _ in range(0, N):
        d.append(list(map(int, input().split())))
    print(solve(N, d))
0