結果

問題 No.2103 ±1s Game
ユーザー helloprahellopra
提出日時 2022-10-21 22:26:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 516 bytes
コンパイル時間 1,378 ms
コンパイル使用メモリ 86,244 KB
実行使用メモリ 71,192 KB
最終ジャッジ日時 2023-09-13 22:44:46
合計ジャッジ時間 4,353 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
70,988 KB
testcase_02 AC 67 ms
71,108 KB
testcase_03 AC 72 ms
70,988 KB
testcase_04 AC 69 ms
71,052 KB
testcase_05 AC 69 ms
70,780 KB
testcase_06 AC 70 ms
71,108 KB
testcase_07 AC 68 ms
70,968 KB
testcase_08 AC 69 ms
71,108 KB
testcase_09 AC 71 ms
71,048 KB
testcase_10 AC 70 ms
70,676 KB
testcase_11 AC 69 ms
70,824 KB
testcase_12 AC 70 ms
70,872 KB
testcase_13 AC 72 ms
71,116 KB
testcase_14 AC 72 ms
70,928 KB
testcase_15 WA -
testcase_16 AC 72 ms
70,784 KB
testcase_17 WA -
testcase_18 AC 73 ms
71,048 KB
testcase_19 AC 71 ms
71,048 KB
testcase_20 AC 69 ms
71,100 KB
testcase_21 AC 70 ms
70,804 KB
testcase_22 AC 68 ms
71,096 KB
testcase_23 AC 69 ms
71,052 KB
testcase_24 AC 69 ms
70,868 KB
testcase_25 AC 71 ms
70,820 KB
testcase_26 AC 70 ms
71,112 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 68 ms
71,032 KB
testcase_30 AC 68 ms
70,788 KB
testcase_31 WA -
testcase_32 AC 71 ms
70,836 KB
testcase_33 AC 71 ms
71,148 KB
testcase_34 AC 68 ms
70,892 KB
testcase_35 AC 71 ms
70,708 KB
testcase_36 AC 70 ms
70,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

X,Y,K,P = map(int,input().split())
cnt = X+Y-K #引く回数
A_cnt = cnt//2+cnt%2
B_cnt = cnt//2
if P==1:
    if A_cnt >= Y: print("Alice");exit()
    if cnt == 1 and Y%2==0: print("Bob");exit()
    if B_cnt > X: print("Alice");exit()
    if A_cnt == B_cnt: print("Bob");exit()
    else:print("Alice");exit()

else:
    if B_cnt >= Y: print("Bob");exit()
    if cnt == 1 and Y%2==1: print("Bob");exit()
    if B_cnt > X: print("Alice");exit()
    if A_cnt == B_cnt: print("Bob");exit()
    else:print("Alice");exit()
0