結果
| 問題 |
No.1015 おつりは要らないです
|
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2021-02-02 15:01:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 95 ms / 2,000 ms |
| コード長 | 465 bytes |
| コンパイル時間 | 157 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 89,600 KB |
| 最終ジャッジ日時 | 2024-06-29 23:41:09 |
| 合計ジャッジ時間 | 4,027 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
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')
H20