結果
| 問題 | No.495 (^^*) Easy |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-17 13:53:27 |
| 言語 | Haskell (9.14.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 8 ms / 2,000 ms |
| + 295µs | |
| コード長 | 346 bytes |
| 記録 | |
| コンパイル時間 | 5,628 ms |
| コンパイル使用メモリ | 198,116 KB |
| 実行使用メモリ | 13,056 KB |
| 最終ジャッジ日時 | 2026-10-07 03:15:53 |
| 合計ジャッジ時間 | 4,674 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Applicative ((<$>))
main :: IO ()
main = do
solve <$> getLine >>= putStrLn
solve :: String -> String
solve = f 0 0
where
f l r "#" = show l ++ " " ++ show r
f l r (x:y:ys) | x == '^' && y == '*' = f (l + 1) r ys
| x == '*' && y == '^' = f l (r + 1) ys
| otherwise = f l r (y:ys)