結果

問題 No.1015 おつりは要らないです
ユーザー 👑 rin204rin204
提出日時 2022-03-21 20:53:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 573 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 90,112 KB
最終ジャッジ日時 2024-04-17 17:23:08
合計ジャッジ時間 5,758 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
52,480 KB
testcase_01 AC 49 ms
51,840 KB
testcase_02 AC 51 ms
52,224 KB
testcase_03 AC 54 ms
51,840 KB
testcase_04 AC 48 ms
52,224 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 46 ms
52,224 KB
testcase_08 AC 50 ms
52,224 KB
testcase_09 AC 51 ms
52,156 KB
testcase_10 AC 108 ms
88,960 KB
testcase_11 AC 106 ms
89,216 KB
testcase_12 AC 104 ms
88,576 KB
testcase_13 AC 101 ms
88,832 KB
testcase_14 AC 102 ms
89,600 KB
testcase_15 AC 102 ms
88,576 KB
testcase_16 AC 102 ms
89,216 KB
testcase_17 AC 102 ms
89,728 KB
testcase_18 AC 102 ms
88,576 KB
testcase_19 AC 105 ms
88,832 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 46 ms
52,096 KB
testcase_31 AC 78 ms
80,128 KB
testcase_32 AC 77 ms
80,128 KB
testcase_33 AC 100 ms
90,112 KB
testcase_34 AC 49 ms
52,480 KB
testcase_35 AC 44 ms
51,584 KB
testcase_36 AC 46 ms
51,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x, y, z = map(int, input().split())
A = list(map(int, input().split()))
A = [a // 1000 + 1 for a in A]

for i in range(n):
    mi = min(z, A[i] // 10)
    A[i] -= mi * 10
    z -= mi
    
for i in range(n):
    mi = min(y, A[i] // 5)
    A[i] -= mi * 5
    y -= mi
    
A.sort(reverse = True)
tot = sum(A[y+z:])
if tot <= x:
    print("Yes")
else:
    print("No")
0