結果
問題 | No.1026 OGAWA's New Keyboard |
ユーザー |
|
提出日時 | 2023-07-30 14:57:44 |
言語 | F# (F# 4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 536 bytes |
コンパイル時間 | 13,736 ms |
コンパイル使用メモリ | 198,848 KB |
実行使用メモリ | 68,632 KB |
最終ジャッジ日時 | 2024-10-09 10:09:54 |
合計ジャッジ時間 | 16,789 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 TLE * 1 |
other | -- * 21 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (270 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) /home/judge/data/code/Main.fs(7,19): 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 () |> intlet mutable ans = ""let arr =[|for _ in 0..n-1 ->match stdin.ReadLine().Split " " with| [|"0"; s|] -> ans <- ans + s| [|_ ; s|] -> ans <- s + ans|]// 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)printfn "%s" ans// Array.reduce writeWrap arr |> snd |> printfn "%s"