結果
問題 | No.1015 おつりは要らないです |
ユーザー |
![]() |
提出日時 | 2024-07-17 02:25:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 404 bytes |
コンパイル時間 | 109 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 21,536 KB |
最終ジャッジ日時 | 2024-07-17 02:25:55 |
合計ジャッジ時間 | 9,308 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 18 WA * 15 |
ソースコード
N,X,Y,Z=map(int,input().split())A=list(map(int,input().split()))A.sort(reverse=True)ans="Yes"for a in A:a+=1c=min(Z,a//10000)Z-=ca-=c*10000c=min(Y,a//5000)Y-=ca-=c*5000c=min(X,a//1000)X-=ca-=c*1000if a:if X:X-=1elif Y:Y-=1elif Z:Z-=1else:ans="No"print(ans)