結果

問題 No.601 Midpoint Erase
ユーザー RyutoRyuto
提出日時 2017-12-11 02:13:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 321 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 10,960 KB
実行使用メモリ 24,016 KB
最終ジャッジ日時 2023-08-24 18:48:46
合計ジャッジ時間 3,589 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,780 KB
testcase_01 AC 15 ms
7,812 KB
testcase_02 AC 15 ms
7,812 KB
testcase_03 AC 206 ms
18,312 KB
testcase_04 AC 233 ms
19,724 KB
testcase_05 AC 168 ms
16,400 KB
testcase_06 AC 99 ms
12,532 KB
testcase_07 AC 217 ms
19,176 KB
testcase_08 AC 192 ms
17,532 KB
testcase_09 AC 227 ms
19,452 KB
testcase_10 AC 62 ms
10,624 KB
testcase_11 AC 321 ms
24,016 KB
testcase_12 AC 149 ms
15,480 KB
testcase_13 AC 15 ms
7,808 KB
testcase_14 AC 15 ms
7,876 KB
testcase_15 AC 15 ms
7,776 KB
testcase_16 AC 15 ms
7,848 KB
testcase_17 AC 15 ms
7,744 KB
testcase_18 AC 15 ms
7,792 KB
testcase_19 AC 15 ms
7,904 KB
testcase_20 AC 16 ms
7,788 KB
testcase_21 AC 15 ms
7,780 KB
testcase_22 AC 15 ms
7,816 KB
testcase_23 AC 15 ms
7,832 KB
testcase_24 AC 15 ms
7,792 KB
testcase_25 AC 15 ms
7,780 KB
権限があれば一括ダウンロードができます

ソースコード

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