結果

問題 No.1026 OGAWA's New Keyboard
ユーザー natoriusannatoriusan
提出日時 2023-07-30 12:47:48
言語 F#
(F# 4.0)
結果
TLE  
実行時間 -
コード長 405 bytes
コンパイル時間 12,371 ms
コンパイル使用メモリ 199,636 KB
実行使用メモリ 98,356 KB
最終ジャッジ日時 2024-04-17 14:03:02
合計ジャッジ時間 15,940 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
34,176 KB
testcase_01 AC 69 ms
36,864 KB
testcase_02 AC 69 ms
30,848 KB
testcase_03 AC 69 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 を復元しました (240 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
/home/judge/data/code/Main.fs(6,17): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj]
/home/judge/data/code/Main.fs(10,54): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '(_,(2,_))' はパターンに含まれないケースを示す可能性があります。 [/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 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)
    
Array.reduce writeWrap arr |> snd |> printfn "%s"
0