結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
70,992 KB
testcase_02 AC 68 ms
71,080 KB
testcase_03 AC 74 ms
71,104 KB
testcase_04 AC 69 ms
71,108 KB
testcase_05 AC 67 ms
71,120 KB
testcase_06 AC 68 ms
70,908 KB
testcase_07 AC 68 ms
71,104 KB
testcase_08 AC 70 ms
70,784 KB
testcase_09 AC 70 ms
70,776 KB
testcase_10 AC 69 ms
71,108 KB
testcase_11 AC 68 ms
70,780 KB
testcase_12 AC 69 ms
71,096 KB
testcase_13 AC 65 ms
71,124 KB
testcase_14 AC 68 ms
71,024 KB
testcase_15 WA -
testcase_16 AC 69 ms
70,732 KB
testcase_17 WA -
testcase_18 AC 69 ms
70,908 KB
testcase_19 AC 71 ms
71,020 KB
testcase_20 AC 70 ms
70,672 KB
testcase_21 AC 70 ms
70,816 KB
testcase_22 AC 72 ms
70,896 KB
testcase_23 AC 68 ms
70,904 KB
testcase_24 AC 70 ms
70,916 KB
testcase_25 AC 70 ms
70,872 KB
testcase_26 AC 69 ms
70,780 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 66 ms
70,828 KB
testcase_30 AC 68 ms
71,112 KB
testcase_31 WA -
testcase_32 AC 68 ms
71,120 KB
testcase_33 AC 69 ms
71,044 KB
testcase_34 AC 70 ms
71,108 KB
testcase_35 AC 68 ms
70,992 KB
testcase_36 AC 71 ms
71,060 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