結果

問題 No.601 Midpoint Erase
ユーザー daku9640
提出日時 2017-12-02 04:01:26
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 586 bytes
コンパイル時間 655 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 303,368 KB
最終ジャッジ日時 2024-11-28 02:37:13
合計ジャッジ時間 32,411 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 11 TLE * 2 MLE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import defaultdict
from itertools import combinations
readline = sys.stdin.readline
f = lambda x, y: (True if (x[0] - y[0]) % 2 == 0 and (x[0] - y[0]) not in (-1, 0, 1) and
                          (x[1] - y[1]) % 2 == 0 and (x[1] - y[1]) not in (-1, 0, 1) else False)
N = int(input())
li = tuple(tuple(map(int, readline().split())) for _ in range(N))
MAP = defaultdict(set)
LIST = []
for x, y in ((i, j) for i, j in combinations(li, 2) if f(i, j)):
    MAP[x].add(y)
    MAP[y].add(x)
    LIST.append({x, y})
print("Bob" if len(list) % 2 == 0 else "Alice")
0