結果
問題 |
No.1015 おつりは要らないです
|
ユーザー |
![]() |
提出日時 | 2020-04-04 13:06:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 526 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 28,340 KB |
最終ジャッジ日時 | 2024-07-03 07:16:23 |
合計ジャッジ時間 | 4,404 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 TLE * 1 -- * 26 |
ソースコード
n, *bill_cnt = map(int, input().split()) bill_money = [1000, 5000, 10000] arr = [a + 1 for a in map(int, input().split())] arr.sort(reverse=True) for i in reversed(range(3)): cnt = bill_cnt[i] money = bill_money[i] for j in range(n): while arr[j] >= money and cnt > 0: cnt -= 1 arr[j] -= money arr.sort(reverse=True) for j in range(n): if cnt > 0: cnt -= 1 arr[j] -= money arr.sort(reverse=True) print("Yes" if arr[0] <= 0 else "No")