結果
問題 | No.279 木の数え上げ |
ユーザー |
|
提出日時 | 2018-09-12 22:47:19 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 128 ms / 2,000 ms |
コード長 | 473 bytes |
コンパイル時間 | 5,615 ms |
コンパイル使用メモリ | 169,856 KB |
実行使用メモリ | 35,328 KB |
最終ジャッジ日時 | 2024-06-28 00:21:41 |
合計ジャッジ時間 | 4,768 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
コンパイルメッセージ
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
ソースコード
LANGUAGEmoduleMainwhereimportControl.Monadcount::String->IntIntIntcount xs = iter 0 0 0 xswhereiter !t !r !e [] = (t, r, e)iter !t !r !e (y:ys)| y == 't' = iter (t + 1) r e ys| y == 'r' = iter t (r + 1) e ys| y == 'e' = iter t r (e + 1) ys| otherwise = iter t r e ysmain::IO()main = doss <- getLinelet (t, r, e) = count ssprint $ minimum [t, r, e `div` 2]