結果

問題 No.365 ジェンガソート
ユーザー はむ吉🐹はむ吉🐹
提出日時 2016-08-17 20:53:15
言語 Haskell
(9.8.2)
結果
AC  
実行時間 192 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 6,591 ms
コンパイル使用メモリ 171,392 KB
実行使用メモリ 35,072 KB
最終ジャッジ日時 2024-04-25 08:24:52
合計ジャッジ時間 11,272 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,248 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 156 ms
29,312 KB
testcase_17 AC 174 ms
33,664 KB
testcase_18 AC 17 ms
9,856 KB
testcase_19 AC 165 ms
33,408 KB
testcase_20 AC 56 ms
16,000 KB
testcase_21 AC 42 ms
13,952 KB
testcase_22 AC 154 ms
28,800 KB
testcase_23 AC 79 ms
18,944 KB
testcase_24 AC 143 ms
27,776 KB
testcase_25 AC 40 ms
13,952 KB
testcase_26 AC 97 ms
21,120 KB
testcase_27 AC 184 ms
34,432 KB
testcase_28 AC 101 ms
20,992 KB
testcase_29 AC 162 ms
33,152 KB
testcase_30 AC 103 ms
20,992 KB
testcase_31 AC 52 ms
15,104 KB
testcase_32 AC 48 ms
14,464 KB
testcase_33 AC 180 ms
34,560 KB
testcase_34 AC 32 ms
12,928 KB
testcase_35 AC 154 ms
28,288 KB
testcase_36 AC 185 ms
34,944 KB
testcase_37 AC 185 ms
34,432 KB
testcase_38 AC 186 ms
34,688 KB
testcase_39 AC 184 ms
35,072 KB
testcase_40 AC 192 ms
34,944 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 = foldr (\x t -> if x == t then t - 1 else t)

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