結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
kuuso1
|
| 提出日時 | 2016-08-17 03:05:43 |
| 言語 | F# (F# 4.0) |
| 結果 |
AC
|
| 実行時間 | 339 ms / 5,000 ms |
| コード長 | 545 bytes |
| コンパイル時間 | 9,701 ms |
| コンパイル使用メモリ | 194,144 KB |
| 実行使用メモリ | 34,656 KB |
| 最終ジャッジ日時 | 2024-11-07 18:38:05 |
| 合計ジャッジ時間 | 12,495 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (298 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/
ソースコード
open System
type Sol() =
member this.Solve() =
let s = stdin.ReadLine()
let mutable max = 0
let mutable cnt = 0
let N = Seq.length s
// '…' == '\u2026'
for i = 0 to (N-1) do
match i with
| 0 -> ( if s.[0] = '\u2026' then (cnt <- 1 ; max <- 1) else ( cnt <- 0 ) )
| _ -> ( if s.[i] = '\u2026' then (cnt <- (cnt+1) ; max <- if cnt > max then cnt else max ) else ( cnt <- 0 ) )
printfn "%d" max
let mySol = new Sol()
mySol.Solve()
kuuso1