結果
問題 | No.1015 おつりは要らないです |
ユーザー |
![]() |
提出日時 | 2020-04-03 23:52:02 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 104 ms / 2,000 ms |
コード長 | 346 bytes |
コンパイル時間 | 288 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 21,704 KB |
最終ジャッジ日時 | 2024-11-17 23:17:36 |
合計ジャッジ時間 | 3,795 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
ソースコード
n, x, y, z = map(int, input().split()) C = [-((int(w)+1)//-1000) for w in input().split()] m = sum(c//10 for c in C) z, m = max(z-m, 0), max(m-z, 0) C = sorted(c%10 for c in C)[:max(n-z, 0)] f = sum(c//5 for c in C) + 2*m y, f = max(y-f, 0), max(f-y, 0) C = sorted(c%5 for c in C)[:max(len(C)-y, 0)] t = sum(C) + 5*f print('No' if t>x else 'Yes')