結果
| 問題 |
No.1015 おつりは要らないです
|
| コンテスト | |
| ユーザー |
near12
|
| 提出日時 | 2020-04-03 21:39:08 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 470 bytes |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 21,820 KB |
| 最終ジャッジ日時 | 2024-07-03 01:46:18 |
| 合計ジャッジ時間 | 7,455 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 11 WA * 22 |
ソースコード
n, x, y, z = map(int, input().split())
a = sorted(map(int, input().split()))
ans = 'Yes'
for i in a:
if i // 10000 > 0 and z:
num = min(i // 10000, z)
z -= num
i -= 10000 * num
if i // 5000 > 0 and y:
num = min(i // 5000, y)
y -= num
i -= 5000 * num
if i // 1000 > 0 and x:
num = min(i // 1000, x)
y -= num
i -= 1000 * num
if i > 0 or x + y + z <= 0:
ans = 'No'
print(ans)
near12