結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー dsplitdsplit
提出日時 2019-08-14 16:01:59
言語 Haskell
(9.8.2)
結果
AC  
実行時間 113 ms / 5,000 ms
コード長 428 bytes
コンパイル時間 7,789 ms
コンパイル使用メモリ 163,004 KB
実行使用メモリ 13,576 KB
最終ジャッジ日時 2023-10-19 18:09:11
合計ジャッジ時間 9,416 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
9,544 KB
testcase_01 AC 112 ms
13,572 KB
testcase_02 AC 3 ms
5,236 KB
testcase_03 AC 2 ms
5,236 KB
testcase_04 AC 2 ms
5,256 KB
testcase_05 AC 113 ms
13,488 KB
testcase_06 AC 2 ms
5,220 KB
testcase_07 AC 2 ms
5,220 KB
testcase_08 AC 2 ms
5,260 KB
testcase_09 AC 3 ms
5,240 KB
testcase_10 AC 2 ms
5,240 KB
testcase_11 AC 2 ms
5,256 KB
testcase_12 AC 2 ms
5,236 KB
testcase_13 AC 2 ms
5,224 KB
testcase_14 AC 72 ms
11,332 KB
testcase_15 AC 32 ms
9,940 KB
testcase_16 AC 82 ms
11,336 KB
testcase_17 AC 32 ms
9,908 KB
testcase_18 AC 83 ms
11,324 KB
testcase_19 AC 62 ms
11,328 KB
testcase_20 AC 112 ms
13,576 KB
testcase_21 AC 7 ms
9,392 KB
testcase_22 AC 42 ms
10,204 KB
testcase_23 AC 102 ms
13,544 KB
testcase_24 AC 112 ms
13,544 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import Data.List ( sort )
main :: IO ()
main = interact $ show . solve . map read . tail . words

solve :: [Int] -> Int
solve xs = snd $ head $ reverse $ sort $ zip [a, b, c, d, e, f] [1..6]
    where
        a = length $ filter (== 1) xs
        b = length $ filter (== 2) xs
        c = length $ filter (== 3) xs
        d = length $ filter (== 4) xs
        e = length $ filter (== 5) xs
        f = length $ filter (== 6) xs
0