結果
問題 |
No.1026 OGAWA's New Keyboard
|
ユーザー |
|
提出日時 | 2023-07-30 12:51:06 |
言語 | F# (F# 4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 563 bytes |
コンパイル時間 | 8,672 ms |
コンパイル使用メモリ | 198,800 KB |
実行使用メモリ | 34,304 KB |
最終ジャッジ日時 | 2024-10-09 08:07:08 |
合計ジャッジ時間 | 11,721 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 TLE * 1 |
other | -- * 21 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (243 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) /home/judge/data/code/Main.fs(6,17): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj] 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 () |> int let arr = [| for _ in 0..n-1 -> let [|t; s|] = stdin.ReadLine().Split " " int t, s |] // let write: (int*string)*(int*string) -> int*string = function // | (_, prev), (0, s) -> (0, prev + s) // | (_, prev), (1, s) -> (1, s + prev) // // let writeWrap a b = // write (a, b) let mutable ans = "" for t, s in arr do match t with | 0 -> ans <- ans + s | _ -> ans <- s + ans printfn "%s" ans // Array.reduce writeWrap arr |> snd |> printfn "%s"