結果

問題 No.1026 OGAWA's New Keyboard
ユーザー natoriusannatoriusan
提出日時 2023-07-30 14:57:44
言語 F#
(F# 4.0)
結果
TLE  
実行時間 -
コード長 536 bytes
コンパイル時間 14,389 ms
コンパイル使用メモリ 201,304 KB
実行使用メモリ 66,180 KB
最終ジャッジ日時 2024-04-17 16:04:50
合計ジャッジ時間 11,990 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
34,428 KB
testcase_01 AC 62 ms
38,300 KB
testcase_02 AC 63 ms
31,228 KB
testcase_03 AC 63 ms
31,104 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (303 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/

ソースコード

diff #

let n = stdin.ReadLine () |> int

let 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"
0