結果

問題 No.464 PPAP
ユーザー Hirotaka OhkuboHirotaka Ohkubo
提出日時 2017-03-02 16:18:05
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 658 bytes
コンパイル時間 8,807 ms
コンパイル使用メモリ 163,536 KB
実行使用メモリ 12,656 KB
最終ジャッジ日時 2023-09-03 20:38:54
合計ジャッジ時間 10,173 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,524 KB
testcase_01 AC 2 ms
6,560 KB
testcase_02 WA -
testcase_03 AC 3 ms
6,632 KB
testcase_04 TLE -
testcase_05 WA -
testcase_06 AC 4 ms
7,984 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

-- q0 = q00
trans (1,st) c = [(1,c:st), (2,st), (2,c:st)]
-- q1
trans (2,s:st) c = [(2,st) | s == c]
trans (2,[]) c = [(3,[c]),(4,[]),(4,[c])]
-- q2
trans (3,st) c = [(3,c:st), (4,st), (4,c:st)]
-- q3
trans (4,s:st) c = [(4,st) | s == c]
trans (4,[]) c = [(5,[]),(6,[])]
-- q5
trans (5,[]) c = [(5,[]),(6,[])]
-- q6
trans (6,st) c = [(6,c:st), (7,st), (7,c:st)]
-- q7
trans (7,s:st) c = [(7,st) | s == c]
trans (7,[]) c = [] -- 早すぎ。入力終了でぴったりここに止まったものだけが成功。

transall = foldr (concatMap.flip trans) [(1,[])]
compute = length . filter ((7,[]) ==) . transall

main = do
  l <- getLine
  print $ compute l
0