結果

問題 No.182 新規性の虜
ユーザー はむ吉🐹はむ吉🐹
提出日時 2015-10-18 20:09:11
言語 Haskell
(9.8.2)
結果
AC  
実行時間 413 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 6,464 ms
コンパイル使用メモリ 163,444 KB
実行使用メモリ 39,836 KB
最終ジャッジ日時 2023-08-27 07:35:51
合計ジャッジ時間 7,818 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,024 KB
testcase_01 AC 3 ms
7,096 KB
testcase_02 AC 3 ms
7,044 KB
testcase_03 AC 2 ms
7,248 KB
testcase_04 AC 3 ms
7,272 KB
testcase_05 AC 3 ms
7,256 KB
testcase_06 AC 3 ms
7,200 KB
testcase_07 AC 3 ms
7,288 KB
testcase_08 AC 262 ms
36,708 KB
testcase_09 AC 413 ms
39,836 KB
testcase_10 AC 363 ms
39,596 KB
testcase_11 AC 283 ms
38,216 KB
testcase_12 AC 112 ms
21,384 KB
testcase_13 AC 2 ms
7,288 KB
testcase_14 AC 2 ms
7,248 KB
testcase_15 AC 2 ms
6,584 KB
testcase_16 AC 2 ms
7,276 KB
testcase_17 AC 3 ms
7,428 KB
testcase_18 AC 263 ms
28,776 KB
testcase_19 AC 172 ms
22,896 KB
testcase_20 AC 113 ms
19,568 KB
testcase_21 AC 332 ms
34,396 KB
testcase_22 AC 142 ms
22,248 KB
testcase_23 AC 3 ms
6,560 KB
testcase_24 AC 232 ms
38,016 KB
testcase_25 AC 143 ms
22,612 KB
testcase_26 AC 52 ms
16,728 KB
testcase_27 AC 2 ms
7,124 KB
evil01.txt AC 373 ms
55,312 KB
evil02.txt AC 363 ms
55,404 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 (group, sort)
import Control.Arrow ((&&&))

freq :: Ord a => [a] -> [(Int, a)]
freq = map (length &&& head) . group . sort

main :: IO ()
main = do
    _ <- getLine
    print . length . filter ((==) 1 . fst) . freq . map (read :: String -> Int) . words=<< getLine
0