結果

問題 No.29 パワーアップ
コンテスト
ユーザー shikatsusan
提出日時 2016-05-19 14:54:56
言語 Haskell
(9.10.1)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 246 bytes
コンパイル時間 1,143 ms
コンパイル使用メモリ 178,944 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-10-24 20:57:23
合計ジャッジ時間 2,025 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.10.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
Main.hs:5:49: 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 ‘$’.
  |
5 |   xxs<-fmap(map words) . sequence . replicate n $getLine
  |                                                 ^

Main.hs:7:42: 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 ‘$’.
  |
7 |     . map length . group . sort . concat $xxs
  |                                          ^

[2 of 2] Linking a.out

ソースコード

diff #

import Data.List
main::IO()
main = do
  n<-fmap read getLine
  xxs<-fmap(map words) . sequence . replicate n $getLine
  print . ( (+) <$> (sum . map (`div` 2)) <*> ((`div` 4) . sum . map (`mod` 2))) 
    . map length . group . sort . concat $xxs
0