結果

問題 No.182 新規性の虜
ユーザー shikatsusanshikatsusan
提出日時 2016-05-19 17:18:23
言語 Haskell
(9.8.2)
結果
AC  
実行時間 382 ms / 5,000 ms
コード長 292 bytes
コンパイル時間 7,281 ms
コンパイル使用メモリ 156,760 KB
実行使用メモリ 40,268 KB
最終ジャッジ日時 2023-08-27 11:25:31
合計ジャッジ時間 8,383 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,260 KB
testcase_01 AC 2 ms
7,256 KB
testcase_02 AC 2 ms
7,188 KB
testcase_03 AC 3 ms
7,396 KB
testcase_04 AC 2 ms
7,360 KB
testcase_05 AC 3 ms
7,368 KB
testcase_06 AC 2 ms
7,416 KB
testcase_07 AC 2 ms
7,460 KB
testcase_08 AC 252 ms
36,908 KB
testcase_09 AC 382 ms
40,268 KB
testcase_10 AC 332 ms
38,588 KB
testcase_11 AC 262 ms
38,308 KB
testcase_12 AC 112 ms
21,688 KB
testcase_13 AC 2 ms
7,368 KB
testcase_14 AC 3 ms
7,436 KB
testcase_15 AC 2 ms
6,852 KB
testcase_16 AC 2 ms
7,448 KB
testcase_17 AC 3 ms
7,540 KB
testcase_18 AC 252 ms
29,360 KB
testcase_19 AC 162 ms
23,304 KB
testcase_20 AC 102 ms
19,896 KB
testcase_21 AC 316 ms
35,144 KB
testcase_22 AC 132 ms
22,764 KB
testcase_23 AC 2 ms
6,728 KB
testcase_24 AC 212 ms
38,144 KB
testcase_25 AC 122 ms
20,868 KB
testcase_26 AC 53 ms
16,996 KB
testcase_27 AC 3 ms
7,264 KB
evil01.txt AC 342 ms
55,536 KB
evil02.txt AC 342 ms
55,536 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 )

Main.hs:9:30: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict]
    The prefix use of a ‘$’ would denote an untyped splice
      were the TemplateHaskell extension enabled.
    Suggested fix: Add whitespace after the ‘$’.
  |
9 |         |x==y      = exe cnt $dropWhile (==x) xs
  |                              ^

Main.hs:12:24: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict]
    The prefix use of a ‘$’ would denote an untyped splice
      were the TemplateHaskell extension enabled.
    Suggested fix: Add whitespace after the ‘$’.
   |
12 |   print . exe 0 . sort $xs
   |                        ^
[2 of 2] Linking a.out

ソースコード

diff #

import Data.List
main::IO()
main =do
  getLine
  xs <-fmap (map (\x->read x::Int) . words) getLine
  let exe cnt []   = cnt
      exe cnt [x]  = cnt+1
      exe cnt (x:ys@(y:xs))
        |x==y      = exe cnt $dropWhile (==x) xs
        |otherwise = exe (cnt+1) ys

  print . exe 0 . sort $xs
0