結果

問題 No.2103 ±1s Game
ユーザー helloprahellopra
提出日時 2022-10-21 22:23:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 518 bytes
コンパイル時間 530 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 71,588 KB
最終ジャッジ日時 2023-09-13 22:42:55
合計ジャッジ時間 4,461 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 72 ms
71,252 KB
testcase_02 AC 71 ms
71,212 KB
testcase_03 AC 72 ms
71,376 KB
testcase_04 AC 71 ms
71,360 KB
testcase_05 AC 73 ms
71,048 KB
testcase_06 AC 70 ms
71,068 KB
testcase_07 AC 73 ms
71,492 KB
testcase_08 AC 71 ms
71,140 KB
testcase_09 AC 72 ms
71,316 KB
testcase_10 AC 76 ms
71,328 KB
testcase_11 AC 73 ms
71,556 KB
testcase_12 AC 72 ms
71,160 KB
testcase_13 AC 73 ms
71,588 KB
testcase_14 AC 74 ms
71,380 KB
testcase_15 AC 75 ms
71,308 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 73 ms
71,348 KB
testcase_19 AC 71 ms
71,376 KB
testcase_20 AC 73 ms
71,504 KB
testcase_21 AC 73 ms
71,328 KB
testcase_22 AC 72 ms
71,048 KB
testcase_23 AC 72 ms
71,312 KB
testcase_24 AC 73 ms
71,400 KB
testcase_25 AC 71 ms
71,372 KB
testcase_26 AC 71 ms
71,348 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 71 ms
71,508 KB
testcase_30 AC 71 ms
71,184 KB
testcase_31 WA -
testcase_32 AC 69 ms
71,344 KB
testcase_33 AC 70 ms
71,352 KB
testcase_34 AC 71 ms
71,404 KB
testcase_35 AC 71 ms
71,372 KB
testcase_36 AC 71 ms
71,380 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