結果
問題 |
No.154 市バス
|
ユーザー |
![]() |
提出日時 | 2015-03-04 17:53:18 |
言語 | Haskell (9.10.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 418 bytes |
コンパイル時間 | 10,108 ms |
コンパイル使用メモリ | 173,056 KB |
実行使用メモリ | 8,064 KB |
最終ジャッジ日時 | 2024-10-13 07:08:54 |
合計ジャッジ時間 | 2,624 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | AC * 5 WA * 3 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Monad main = do n <- readLn replicateM n $ do s <- getLine let f [] g = g == 0 f (x:xs) g | x == 'W' = f xs g | x == 'G' = f xs (g+1) | g > 0 = f xs (g-1) | otherwise = False in putStrLn $ if length s < 3 || not (f s 0) then "impossible" else "possible"