結果
| 問題 |
No.29 パワーアップ
|
| コンテスト | |
| ユーザー |
shikatsusan
|
| 提出日時 | 2016-05-19 14:57:16 |
| 言語 | Haskell (9.10.1) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 273 bytes |
| コンパイル時間 | 1,225 ms |
| コンパイル使用メモリ | 178,688 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 20:57:24 |
| 合計ジャッジ時間 | 2,074 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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:6: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 ‘$’.
|
6 | xxs<-fmap(map words) . sequence . replicate n $getLine
| ^
Main.hs:8: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 ‘$’.
|
8 | . map length . group . sort . concat $xxs
| ^
[2 of 2] Linking a.out
ソースコード
import Control.Applicative
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
shikatsusan