結果
問題 |
No.365 ジェンガソート
|
ユーザー |
|
提出日時 | 2016-09-09 07:13:07 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 368 ms / 2,000 ms |
コード長 | 261 bytes |
コンパイル時間 | 9,503 ms |
コンパイル使用メモリ | 173,884 KB |
実行使用メモリ | 83,072 KB |
最終ジャッジ日時 | 2024-11-15 22:57:07 |
合計ジャッジ時間 | 14,198 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 |
コンパイルメッセージ
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 solve [] _ = 0 solve (x:xs) n | x == n = solve xs (n-1) | otherwise = 1 + solve xs n main :: IO() main = do n <- (read::String->Int) <$> getLine a <- reverse . map (read::String->Int) . words <$> getLine print $ solve a n