結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
jugemjugemjugem
|
| 提出日時 | 2017-10-28 21:04:20 |
| 言語 | Haskell (9.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 365 bytes |
| 記録 | |
| コンパイル時間 | 1,050 ms |
| コンパイル使用メモリ | 194,304 KB |
| 実行使用メモリ | 17,792 KB |
| 最終ジャッジ日時 | 2026-05-16 07:50:35 |
| 合計ジャッジ時間 | 7,900 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 TLE * 1 -- * 30 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Monad import Control.Applicative main = do l <- readLn n <- readLn w <- map read . words <$> getLine -- [w] <- map read . words <$> getLine putStrLn . show $ solve l n w solve :: Int -> Int -> [Int] -> Int solve l 0 w = 0 solve l n (x:xs) | l >= x = max (1 + (solve (l-x) (n-1) xs)) (solve l (n-1) xs) | otherwise = solve l (n-1) xs
jugemjugemjugem