結果

問題 No.1015 おつりは要らないです
ユーザー 👑 H20H20
提出日時 2021-02-02 15:01:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 465 bytes
コンパイル時間 482 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 93,984 KB
最終ジャッジ日時 2023-09-12 11:05:38
合計ジャッジ時間 5,803 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,072 KB
testcase_01 AC 73 ms
71,280 KB
testcase_02 AC 73 ms
71,236 KB
testcase_03 AC 74 ms
71,076 KB
testcase_04 AC 73 ms
71,256 KB
testcase_05 AC 74 ms
71,012 KB
testcase_06 AC 74 ms
71,076 KB
testcase_07 AC 73 ms
71,064 KB
testcase_08 AC 74 ms
71,336 KB
testcase_09 AC 75 ms
71,448 KB
testcase_10 AC 130 ms
93,412 KB
testcase_11 AC 131 ms
93,976 KB
testcase_12 AC 127 ms
93,072 KB
testcase_13 AC 127 ms
93,420 KB
testcase_14 AC 131 ms
93,828 KB
testcase_15 AC 128 ms
93,192 KB
testcase_16 AC 130 ms
93,960 KB
testcase_17 AC 129 ms
93,984 KB
testcase_18 AC 128 ms
93,296 KB
testcase_19 AC 127 ms
93,456 KB
testcase_20 AC 114 ms
91,616 KB
testcase_21 AC 113 ms
91,756 KB
testcase_22 AC 114 ms
91,724 KB
testcase_23 AC 115 ms
91,692 KB
testcase_24 AC 115 ms
91,916 KB
testcase_25 AC 116 ms
91,628 KB
testcase_26 AC 115 ms
91,588 KB
testcase_27 AC 114 ms
91,776 KB
testcase_28 AC 114 ms
91,536 KB
testcase_29 AC 115 ms
91,580 KB
testcase_30 AC 73 ms
71,260 KB
testcase_31 AC 95 ms
89,888 KB
testcase_32 AC 94 ms
89,996 KB
testcase_33 AC 113 ms
93,588 KB
testcase_34 AC 75 ms
71,260 KB
testcase_35 AC 74 ms
71,068 KB
testcase_36 AC 73 ms
71,456 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
A.sort()
A = A[:len(A)-Z]
for i in range(len(A)):
    if A[i]>=5000 and Y > 0:
        temp = min(A[i]//5000,Y)
        A[i]-=temp*5000
        Y-=temp
A.sort()
A = A[:len(A)-Y]

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

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