結果

問題 No.1015 おつりは要らないです
ユーザー rei60rei60
提出日時 2020-04-04 10:37:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 268 ms / 2,000 ms
コード長 481 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 23,032 KB
最終ジャッジ日時 2024-04-29 05:05:54
合計ジャッジ時間 7,037 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,496 KB
testcase_01 AC 32 ms
10,624 KB
testcase_02 AC 31 ms
10,624 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 31 ms
10,624 KB
testcase_05 AC 30 ms
10,624 KB
testcase_06 AC 31 ms
10,624 KB
testcase_07 AC 30 ms
10,624 KB
testcase_08 AC 30 ms
10,752 KB
testcase_09 AC 30 ms
10,752 KB
testcase_10 AC 256 ms
22,488 KB
testcase_11 AC 263 ms
22,744 KB
testcase_12 AC 238 ms
21,856 KB
testcase_13 AC 256 ms
22,384 KB
testcase_14 AC 268 ms
23,032 KB
testcase_15 AC 248 ms
22,072 KB
testcase_16 AC 251 ms
22,604 KB
testcase_17 AC 262 ms
22,616 KB
testcase_18 AC 252 ms
22,416 KB
testcase_19 AC 247 ms
22,380 KB
testcase_20 AC 217 ms
21,060 KB
testcase_21 AC 207 ms
21,092 KB
testcase_22 AC 210 ms
20,844 KB
testcase_23 AC 200 ms
20,724 KB
testcase_24 AC 211 ms
21,104 KB
testcase_25 AC 211 ms
20,968 KB
testcase_26 AC 203 ms
20,816 KB
testcase_27 AC 207 ms
20,752 KB
testcase_28 AC 204 ms
20,732 KB
testcase_29 AC 210 ms
20,876 KB
testcase_30 AC 31 ms
10,624 KB
testcase_31 AC 158 ms
12,940 KB
testcase_32 AC 157 ms
12,820 KB
testcase_33 AC 223 ms
22,212 KB
testcase_34 AC 30 ms
10,624 KB
testcase_35 AC 29 ms
10,624 KB
testcase_36 AC 29 ms
10,752 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
C.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