結果
問題 | No.239 にゃんぱすー |
ユーザー |
![]() |
提出日時 | 2016-08-18 06:20:39 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 345 ms / 2,000 ms |
コード長 | 751 bytes |
コンパイル時間 | 8,386 ms |
コンパイル使用メモリ | 189,300 KB |
実行使用メモリ | 35,716 KB |
最終ジャッジ日時 | 2024-11-07 19:10:42 |
合計ジャッジ時間 | 22,098 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (256 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 N = stdin.ReadLine() |> int let S = Array.zeroCreate<string array> N for i = 0 to (N-1) do S.[i] <- stdin.ReadLine().Split(); let checkRenchon (s :string [] []) j = let mutable chk = true for i=0 to (N-1) do if i <> j then (chk <- (chk && (s.[i].[j] = "nyanpass" ))) chk let mutable cnt = 0 let mutable idx = -1 for i = 0 to (N-1) do match (checkRenchon S i) with | true -> (cnt <- (cnt + 1) ;idx <- (i+1)) | false -> () printfn "%d" (if cnt = 1 then idx else -1) let mySol = new Sol() mySol.Solve()