結果

問題 No.601 Midpoint Erase
ユーザー ssmkzkssmkzk
提出日時 2018-12-12 15:31:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 313 ms / 2,000 ms
コード長 584 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 11,860 KB
実行使用メモリ 10,088 KB
最終ジャッジ日時 2023-10-25 08:26:35
合計ジャッジ時間 4,518 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,072 KB
testcase_01 AC 27 ms
10,072 KB
testcase_02 AC 27 ms
10,072 KB
testcase_03 AC 208 ms
10,088 KB
testcase_04 AC 240 ms
10,088 KB
testcase_05 AC 173 ms
10,088 KB
testcase_06 AC 109 ms
10,088 KB
testcase_07 AC 228 ms
10,088 KB
testcase_08 AC 196 ms
10,088 KB
testcase_09 AC 227 ms
10,088 KB
testcase_10 AC 71 ms
10,088 KB
testcase_11 AC 313 ms
10,088 KB
testcase_12 AC 159 ms
10,088 KB
testcase_13 AC 29 ms
10,072 KB
testcase_14 AC 28 ms
10,072 KB
testcase_15 AC 28 ms
10,072 KB
testcase_16 AC 28 ms
10,072 KB
testcase_17 AC 27 ms
10,072 KB
testcase_18 AC 28 ms
10,072 KB
testcase_19 AC 29 ms
10,072 KB
testcase_20 AC 28 ms
10,072 KB
testcase_21 AC 28 ms
10,072 KB
testcase_22 AC 27 ms
10,072 KB
testcase_23 AC 28 ms
10,072 KB
testcase_24 AC 28 ms
10,072 KB
testcase_25 AC 29 ms
10,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
count_ee = 0
count_eo = 0
count_oe = 0
count_oo = 0

def ck_evenodd(n):
    n = int(n)
    if n % 2 == 0:
        return 0
    else:
        return 1

for i in range(N):
    x, y = map(ck_evenodd, input().split())
    if x == 0 and y == 0:
        count_ee += 1
    elif x == 0 and y == 1:
        count_eo += 1
    elif x == 1 and y == 0:
        count_oe += 1
    else:
        count_oo += 1

times = (count_ee // 2) + (count_eo // 2) + (count_oe // 2) + (count_oo // 2)
if times == 0:
    print("Bob")
elif times % 2 == 0:
    print("Bob")
else:
    print("Alice")
0