結果

問題 No.1015 おつりは要らないです
ユーザー NoneNone
提出日時 2021-05-01 07:42:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 493 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 92,152 KB
最終ジャッジ日時 2023-09-26 16:32:36
合計ジャッジ時間 7,627 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,100 KB
testcase_01 AC 72 ms
71,256 KB
testcase_02 AC 72 ms
71,336 KB
testcase_03 AC 72 ms
71,328 KB
testcase_04 AC 71 ms
71,176 KB
testcase_05 WA -
testcase_06 AC 72 ms
71,316 KB
testcase_07 AC 70 ms
71,416 KB
testcase_08 AC 73 ms
71,228 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 116 ms
91,584 KB
testcase_16 AC 116 ms
91,632 KB
testcase_17 AC 119 ms
91,916 KB
testcase_18 AC 116 ms
91,788 KB
testcase_19 AC 117 ms
91,904 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 71 ms
71,208 KB
testcase_31 AC 97 ms
89,072 KB
testcase_32 AC 99 ms
88,896 KB
testcase_33 AC 105 ms
91,736 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 70 ms
71,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X,Y,Z=map(int, input().split())
A=list(map(int, input().split()))
A.sort(reverse=True)
for a in A:
    if X<0 or Y<0 or Z<0:
        print("No")
        exit()
    z=min(a//10000,Z)
    a-=z*10000
    Z-=z
    if a<0:
        continue
    if Y==X==0:
        Z-=1
        continue
    y=min(a//10000,Y)
    a-=y*5000
    Y-=y
    if a<0:
        continue
    if X==0:
        Y-=1
        continue
    x=(a-1)//1000 + 1
    X-=x

if X<0 or Y<0 or Z<0:
    print("No")
    exit()
print("Yes")
0