結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2016-05-19 14:54:56 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 246 bytes |
コンパイル時間 | 1,890 ms |
コンパイル使用メモリ | 172,928 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 06:10:02 |
合計ジャッジ時間 | 2,337 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/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
ソースコード
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