結果

問題 No.345 最小チワワ問題
ユーザー pekempeypekempey
提出日時 2016-07-29 00:53:49
言語 Haskell
(9.8.2)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 6,380 ms
コンパイル使用メモリ 167,932 KB
実行使用メモリ 5,472 KB
最終ジャッジ日時 2023-10-26 04:00:16
合計ジャッジ時間 7,410 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,896 KB
testcase_01 AC 3 ms
4,952 KB
testcase_02 AC 2 ms
4,928 KB
testcase_03 AC 3 ms
4,936 KB
testcase_04 AC 2 ms
4,896 KB
testcase_05 AC 2 ms
4,888 KB
testcase_06 AC 2 ms
4,888 KB
testcase_07 AC 2 ms
4,896 KB
testcase_08 AC 3 ms
4,972 KB
testcase_09 AC 3 ms
4,928 KB
testcase_10 AC 4 ms
5,124 KB
testcase_11 AC 4 ms
5,152 KB
testcase_12 AC 13 ms
5,428 KB
testcase_13 AC 12 ms
5,472 KB
testcase_14 AC 12 ms
5,456 KB
testcase_15 AC 4 ms
5,108 KB
testcase_16 AC 3 ms
5,016 KB
testcase_17 AC 2 ms
4,916 KB
testcase_18 AC 4 ms
5,264 KB
testcase_19 AC 2 ms
4,888 KB
testcase_20 AC 2 ms
4,900 KB
testcase_21 AC 2 ms
4,900 KB
testcase_22 AC 3 ms
4,936 KB
testcase_23 AC 3 ms
4,912 KB
testcase_24 AC 2 ms
4,912 KB
testcase_25 AC 2 ms
4,904 KB
testcase_26 AC 3 ms
4,900 KB
testcase_27 AC 3 ms
4,940 KB
testcase_28 AC 2 ms
4,928 KB
testcase_29 AC 3 ms
5,060 KB
testcase_30 AC 2 ms
4,984 KB
testcase_31 AC 2 ms
4,884 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

main = do
    s <- getLine
    let n = length s
    let u = zip s [1 .. n]
    let ls = [z - x + 1 | (a, x) <- u, (b, y) <- u, (c, z) <- u, x < y, y < z, a == 'c', b == 'w', c == 'w']
    print $ if null ls then -1 else minimum ls

0