結果
問題 |
No.247 線形計画問題もどき
|
ユーザー |
![]() |
提出日時 | 2015-12-20 16:12:58 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 137 bytes |
コンパイル時間 | 94 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 17,240 KB |
最終ジャッジ日時 | 2024-09-17 12:17:11 |
合計ジャッジ時間 | 4,056 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 5 |
other | WA * 2 TLE * 1 -- * 20 |
ソースコード
c=input();input() d=[0]+[c+1]*c for e in map(int,raw_input().split()): for j in range(e,c+1):d[j]=min(d[j-e],d[j]) print-(d[c]>c)or d[c]