結果

問題 No.1015 おつりは要らないです
ユーザー rei60rei60
提出日時 2020-04-04 10:32:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 481 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 10,848 KB
実行使用メモリ 20,508 KB
最終ジャッジ日時 2023-09-16 05:28:56
合計ジャッジ時間 6,059 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,984 KB
testcase_01 AC 15 ms
7,748 KB
testcase_02 AC 15 ms
7,800 KB
testcase_03 AC 16 ms
7,852 KB
testcase_04 WA -
testcase_05 AC 17 ms
7,804 KB
testcase_06 AC 16 ms
7,840 KB
testcase_07 AC 15 ms
7,856 KB
testcase_08 AC 15 ms
7,984 KB
testcase_09 AC 15 ms
7,780 KB
testcase_10 AC 198 ms
19,940 KB
testcase_11 AC 205 ms
20,288 KB
testcase_12 AC 188 ms
19,588 KB
testcase_13 AC 197 ms
19,856 KB
testcase_14 AC 204 ms
20,508 KB
testcase_15 AC 190 ms
19,692 KB
testcase_16 AC 197 ms
19,844 KB
testcase_17 AC 203 ms
20,332 KB
testcase_18 AC 202 ms
19,736 KB
testcase_19 AC 199 ms
19,864 KB
testcase_20 AC 174 ms
18,756 KB
testcase_21 AC 166 ms
18,496 KB
testcase_22 AC 164 ms
18,484 KB
testcase_23 AC 162 ms
18,124 KB
testcase_24 AC 168 ms
18,712 KB
testcase_25 AC 166 ms
18,616 KB
testcase_26 AC 166 ms
18,536 KB
testcase_27 AC 163 ms
18,460 KB
testcase_28 AC 164 ms
18,388 KB
testcase_29 AC 167 ms
18,736 KB
testcase_30 AC 16 ms
7,852 KB
testcase_31 AC 125 ms
10,292 KB
testcase_32 AC 122 ms
10,276 KB
testcase_33 AC 178 ms
19,884 KB
testcase_34 AC 15 ms
7,808 KB
testcase_35 AC 15 ms
7,808 KB
testcase_36 AC 15 ms
7,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, X, Y, Z = map(int,input().split())
A = list(map(int,input().split())) 
B = []
C = []
for i in A:   
    temp = min(i//10000, Z)
    B.append(i - temp*10000)
    Z -= temp
B.sort(reverse = True)

if Z >= 0:
        B = B[Z:]

for i in B:   
    temp = min(i//5000, Y)
    C.append(i - temp*5000)
    Y -= temp
B.sort(reverse = True)

if Y >= 0:
        C = C[Y:]

for i in C:
    X -= (i//1000 + 1)

if X >= 0 and Y >= 0 and Z >= 0:
    print("Yes")
else:
    print("No")
       
0