結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
![]() |
提出日時 | 2016-05-17 13:40:32 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 229 bytes |
コンパイル時間 | 3,089 ms |
コンパイル使用メモリ | 171,852 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-18 09:42:07 |
合計ジャッジ時間 | 2,790 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
コンパイルメッセージ
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:6:52: 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 | f1 xs = a : (f1 . dropWhile (=='x') . drop a $xs) | ^ Main.hs:7:45: 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 | where a =length .takeWhile (=='o') $xs | ^ [2 of 2] Linking a.out
ソースコード
main::IO() main = do ws1 <-getLine ws2 <-getLine let f1 [] = [0] f1 xs = a : (f1 . dropWhile (=='x') . drop a $xs) where a =length .takeWhile (=='o') $xs print . maximum . f1 . dropWhile (=='x') $ ws1++ws2