結果

問題 No.365 ジェンガソート
ユーザー はむ吉🐹はむ吉🐹
提出日時 2016-05-01 17:43:44
言語 Haskell
(9.8.2)
結果
AC  
実行時間 295 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 1,478 ms
コンパイル使用メモリ 174,464 KB
実行使用メモリ 83,072 KB
最終ジャッジ日時 2024-04-20 06:52:44
合計ジャッジ時間 7,008 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1 ms
6,940 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,944 KB
testcase_08 AC 1 ms
6,944 KB
testcase_09 AC 1 ms
6,944 KB
testcase_10 AC 1 ms
6,944 KB
testcase_11 AC 1 ms
6,940 KB
testcase_12 AC 1 ms
6,944 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 1 ms
6,940 KB
testcase_15 AC 1 ms
6,940 KB
testcase_16 AC 202 ms
48,896 KB
testcase_17 AC 253 ms
66,304 KB
testcase_18 AC 21 ms
12,416 KB
testcase_19 AC 250 ms
64,512 KB
testcase_20 AC 76 ms
25,344 KB
testcase_21 AC 58 ms
21,248 KB
testcase_22 AC 197 ms
48,768 KB
testcase_23 AC 125 ms
39,680 KB
testcase_24 AC 190 ms
47,872 KB
testcase_25 AC 55 ms
21,120 KB
testcase_26 AC 152 ms
43,648 KB
testcase_27 AC 285 ms
81,408 KB
testcase_28 AC 160 ms
46,848 KB
testcase_29 AC 223 ms
54,016 KB
testcase_30 AC 158 ms
46,720 KB
testcase_31 AC 69 ms
24,192 KB
testcase_32 AC 65 ms
24,448 KB
testcase_33 AC 289 ms
80,000 KB
testcase_34 AC 45 ms
18,816 KB
testcase_35 AC 189 ms
47,744 KB
testcase_36 AC 291 ms
82,816 KB
testcase_37 AC 290 ms
83,072 KB
testcase_38 AC 295 ms
82,816 KB
testcase_39 AC 295 ms
82,944 KB
testcase_40 AC 294 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 ((<$>))

minNumOfOps :: Integral a => a -> [a] -> a
minNumOfOps n xs = mnoo n $ reverse xs
    where
        mnoo t [] = t
        mnoo t (y : ys)
            | y == t    = flip mnoo ys $ t - 1
            | otherwise = mnoo t ys

main :: IO ()
main = do
    n <- readLn
    xs <- map read . words <$> getLine
    print $ minNumOfOps n xs
0