結果

問題 No.345 最小チワワ問題
ユーザー ichibanshiboriichibanshibori
提出日時 2016-04-29 23:51:23
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 300 bytes
コンパイル時間 7,904 ms
コンパイル使用メモリ 184,956 KB
実行使用メモリ 39,052 KB
最終ジャッジ日時 2024-04-15 06:12:30
合計ジャッジ時間 19,101 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 309 ms
36,528 KB
testcase_01 AC 307 ms
36,404 KB
testcase_02 AC 311 ms
36,760 KB
testcase_03 AC 309 ms
36,496 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 310 ms
35,408 KB
testcase_08 AC 306 ms
35,540 KB
testcase_09 AC 306 ms
35,668 KB
testcase_10 AC 309 ms
36,784 KB
testcase_11 AC 325 ms
35,700 KB
testcase_12 AC 309 ms
35,412 KB
testcase_13 AC 320 ms
35,540 KB
testcase_14 WA -
testcase_15 AC 309 ms
36,520 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 308 ms
36,272 KB
testcase_20 AC 319 ms
36,116 KB
testcase_21 AC 311 ms
35,532 KB
testcase_22 AC 310 ms
36,500 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 307 ms
35,408 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 307 ms
35,544 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (287 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

open System
open System.Text.RegularExpressions

let pattern = new Regex(@"c.*?w.*?w")
let searchCww str =
    pattern.Matches(str) |>
    function m when m.Count = 0 -> -1
           | m -> seq { for i in 0..(m.Count - 1) -> m.[i].Length} |> Seq.min

Console.ReadLine () |> searchCww |> printfn "%d"
0