結果

問題 No.365 ジェンガソート
ユーザー HaarHaar
提出日時 2016-09-09 07:13:07
言語 Haskell
(9.8.2)
結果
AC  
実行時間 291 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 7,019 ms
コンパイル使用メモリ 173,152 KB
実行使用メモリ 83,200 KB
最終ジャッジ日時 2024-04-27 18:24:23
合計ジャッジ時間 9,951 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 1 ms
6,820 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 AC 1 ms
6,940 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 AC 1 ms
6,944 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 1 ms
6,944 KB
testcase_13 AC 1 ms
6,940 KB
testcase_14 AC 2 ms
6,944 KB
testcase_15 AC 1 ms
6,944 KB
testcase_16 AC 198 ms
48,768 KB
testcase_17 AC 256 ms
68,096 KB
testcase_18 AC 21 ms
12,416 KB
testcase_19 AC 252 ms
66,816 KB
testcase_20 AC 73 ms
25,216 KB
testcase_21 AC 55 ms
21,376 KB
testcase_22 AC 193 ms
48,896 KB
testcase_23 AC 121 ms
39,680 KB
testcase_24 AC 186 ms
47,744 KB
testcase_25 AC 54 ms
21,248 KB
testcase_26 AC 145 ms
43,776 KB
testcase_27 AC 285 ms
81,664 KB
testcase_28 AC 156 ms
46,848 KB
testcase_29 AC 224 ms
53,888 KB
testcase_30 AC 160 ms
46,976 KB
testcase_31 AC 66 ms
24,320 KB
testcase_32 AC 64 ms
24,320 KB
testcase_33 AC 287 ms
80,512 KB
testcase_34 AC 44 ms
18,688 KB
testcase_35 AC 184 ms
47,872 KB
testcase_36 AC 282 ms
82,816 KB
testcase_37 AC 285 ms
83,200 KB
testcase_38 AC 290 ms
83,072 KB
testcase_39 AC 285 ms
82,944 KB
testcase_40 AC 291 ms
82,816 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

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
0