結果

問題 No.464 PPAP
ユーザー Hirotaka OhkuboHirotaka Ohkubo
提出日時 2017-03-02 17:09:10
言語 Haskell
(9.6.2)
結果
TLE  
実行時間 -
コード長 646 bytes
コンパイル時間 4,963 ms
コンパイル使用メモリ 164,296 KB
実行使用メモリ 16,100 KB
最終ジャッジ日時 2023-09-03 20:40:43
合計ジャッジ時間 9,443 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
13,596 KB
testcase_01 AC 2 ms
6,580 KB
testcase_02 AC 2 ms
6,612 KB
testcase_03 AC 3 ms
6,568 KB
testcase_04 TLE -
testcase_05 AC 403 ms
11,928 KB
testcase_06 AC 4 ms
7,856 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 #

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

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

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