結果

問題 No.1015 おつりは要らないです
ユーザー 👑 H20H20
提出日時 2021-02-02 14:54:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 397 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 92,232 KB
最終ジャッジ日時 2023-09-12 11:04:54
合計ジャッジ時間 7,175 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,160 KB
testcase_01 AC 75 ms
71,196 KB
testcase_02 AC 74 ms
71,276 KB
testcase_03 AC 75 ms
71,516 KB
testcase_04 AC 74 ms
71,068 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 74 ms
71,260 KB
testcase_08 AC 75 ms
71,192 KB
testcase_09 AC 73 ms
71,256 KB
testcase_10 AC 124 ms
92,028 KB
testcase_11 AC 124 ms
92,232 KB
testcase_12 AC 120 ms
91,632 KB
testcase_13 AC 122 ms
91,724 KB
testcase_14 AC 125 ms
92,116 KB
testcase_15 AC 122 ms
91,584 KB
testcase_16 AC 123 ms
92,168 KB
testcase_17 AC 125 ms
92,204 KB
testcase_18 AC 123 ms
92,156 KB
testcase_19 AC 123 ms
91,940 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 74 ms
71,272 KB
testcase_31 AC 93 ms
89,044 KB
testcase_32 AC 94 ms
89,152 KB
testcase_33 AC 106 ms
91,808 KB
testcase_34 AC 73 ms
71,284 KB
testcase_35 AC 73 ms
71,196 KB
testcase_36 AC 74 ms
71,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X,Y,Z = map(int,input().split())
A = list(map(int,input().split()))
for i in range(N):
    if A[i]>=10000 and Z > 0:
        temp = min(A[i]//10000,Z)
        A[i]-=temp*10000
        Z-=temp
    if A[i]>=5000 and Y > 0:
        temp = min(A[i]//5000,Y)
        A[i]-=temp*5000
        Y-=temp
A.sort()

for i in range(N-Z-Y):
    X-=A[i]//1000+1

if X>=0:
    print('Yes')
else:
    print('No')
0