結果
問題 | No.805 UMG |
ユーザー | natoriusan |
提出日時 | 2023-08-01 15:28:17 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 526 ms / 2,000 ms |
コード長 | 285 bytes |
コンパイル時間 | 8,202 ms |
コンパイル使用メモリ | 184,164 KB |
実行使用メモリ | 73,088 KB |
最終ジャッジ日時 | 2024-10-11 06:59:00 |
合計ジャッジ時間 | 20,580 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (242 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/
ソースコード
let n = stdin.ReadLine () |> intlet s = stdin.ReadLine ()[|for i in 0..(n-1)/2 ->[|for j in 0..n-3-2*i ->s.[j] = 'U' && s.[j+i+1] = 'M' && s.[j+2*i+2] = 'G'|]|] |> Array.concat |> Array.filter id |> Array.length |> printfn "%d"