結果
| 問題 |
No.27 板の準備
|
| コンテスト | |
| ユーザー |
tottoripaper
|
| 提出日時 | 2014-11-16 21:07:00 |
| 言語 | Haskell (9.10.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 5,000 ms |
| コード長 | 328 bytes |
| コンパイル時間 | 6,900 ms |
| コンパイル使用メモリ | 174,336 KB |
| 実行使用メモリ | 8,064 KB |
| 最終ジャッジ日時 | 2024-12-26 10:26:20 |
| 合計ジャッジ時間 | 7,985 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Applicative
main = do
vs <- map read . words <$> getLine
let
f [] n = if n == 0 then 0 else 10000
f ys@(x:xs) n
| x <= n = min (f ys (n-x) + 1) (f xs n)
| otherwise = f xs n
mn = minimum [sum $ map (f [c,b,a]) vs | a <- [1..30], b <- [a..30], c <- [b..30]]
in print mn
tottoripaper