結果

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

ソースコード

diff #

#!/usr/bin/env python

n = int(input().strip())
points = []
for i in range(n):
    points.append([int(x) for x in input().split()])

eveneven = 0
evenodd = 0
oddeven = 0
oddodd = 0

for point in points:
    if point[0]%2==0 and point[1]%2==0:
        eveneven += 1
    elif point[0]%2==0 and point[1]%2==1:
        evenodd += 1
    elif point[0]%2==1 and point[1]%2==0:
        oddeven += 1
    else:
        oddodd += 1

ntimes = eveneven//2 + evenodd//2 + oddeven//2 + oddodd//2

if ntimes % 2 == 0:
    print('Bob')
else:
    print('Alice')
0