結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー はむ吉🐹はむ吉🐹
提出日時 2015-10-22 00:24:29
言語 Haskell
(9.8.2)
結果
AC  
実行時間 223 ms / 5,000 ms
コード長 295 bytes
コンパイル時間 3,458 ms
コンパイル使用メモリ 165,284 KB
実行使用メモリ 21,728 KB
最終ジャッジ日時 2023-09-08 14:40:03
合計ジャッジ時間 6,607 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
11,864 KB
testcase_01 AC 212 ms
21,204 KB
testcase_02 AC 2 ms
7,220 KB
testcase_03 AC 3 ms
7,228 KB
testcase_04 AC 2 ms
7,248 KB
testcase_05 AC 122 ms
19,456 KB
testcase_06 AC 3 ms
7,080 KB
testcase_07 AC 3 ms
7,096 KB
testcase_08 AC 2 ms
7,212 KB
testcase_09 AC 3 ms
7,232 KB
testcase_10 AC 2 ms
7,176 KB
testcase_11 AC 3 ms
7,192 KB
testcase_12 AC 3 ms
7,296 KB
testcase_13 AC 3 ms
7,216 KB
testcase_14 AC 132 ms
17,404 KB
testcase_15 AC 52 ms
14,128 KB
testcase_16 AC 163 ms
20,320 KB
testcase_17 AC 52 ms
13,428 KB
testcase_18 AC 162 ms
20,412 KB
testcase_19 AC 113 ms
17,412 KB
testcase_20 AC 223 ms
21,268 KB
testcase_21 AC 12 ms
11,444 KB
testcase_22 AC 72 ms
15,492 KB
testcase_23 AC 203 ms
20,972 KB
testcase_24 AC 213 ms
21,728 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import Data.List (sort, sortBy, group)
import Data.Ord (comparing)

getLevel :: [Int] -> Int
getLevel = fst . head . sortBy (flip $ comparing snd) .
    map (\xs -> (head xs, length xs)) . group . reverse . sort

main :: IO ()
main = print . getLevel . map read . drop 1 . words =<< getContents
0