結果

問題 No.1910 High Element on Grid
ユーザー 👑 kakel-sankakel-san
提出日時 2023-11-09 22:20:02
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 956 bytes
コンパイル時間 8,757 ms
コンパイル使用メモリ 158,912 KB
実行使用メモリ 184,656 KB
最終ジャッジ日時 2023-11-09 22:20:24
合計ジャッジ時間 18,898 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
33,060 KB
testcase_01 AC 82 ms
33,060 KB
testcase_02 AC 80 ms
33,060 KB
testcase_03 AC 80 ms
33,060 KB
testcase_04 AC 83 ms
33,060 KB
testcase_05 AC 86 ms
33,060 KB
testcase_06 AC 81 ms
33,060 KB
testcase_07 AC 85 ms
33,060 KB
testcase_08 AC 81 ms
33,060 KB
testcase_09 AC 81 ms
33,060 KB
testcase_10 AC 83 ms
33,060 KB
testcase_11 AC 134 ms
47,268 KB
testcase_12 AC 110 ms
47,908 KB
testcase_13 AC 108 ms
47,780 KB
testcase_14 AC 112 ms
49,828 KB
testcase_15 AC 106 ms
45,476 KB
testcase_16 AC 99 ms
42,020 KB
testcase_17 AC 103 ms
45,220 KB
testcase_18 AC 110 ms
47,652 KB
testcase_19 AC 105 ms
45,220 KB
testcase_20 AC 105 ms
45,220 KB
testcase_21 AC 107 ms
46,884 KB
testcase_22 AC 100 ms
40,996 KB
testcase_23 AC 111 ms
48,676 KB
testcase_24 AC 103 ms
41,892 KB
testcase_25 AC 108 ms
46,628 KB
testcase_26 AC 106 ms
45,732 KB
testcase_27 AC 107 ms
46,372 KB
testcase_28 AC 96 ms
40,356 KB
testcase_29 AC 100 ms
41,764 KB
testcase_30 AC 107 ms
44,836 KB
testcase_31 AC 88 ms
32,932 KB
testcase_32 AC 116 ms
51,876 KB
testcase_33 AC 118 ms
51,876 KB
testcase_34 AC 118 ms
51,876 KB
testcase_35 AC 119 ms
51,876 KB
testcase_36 AC 81 ms
33,316 KB
testcase_37 AC 101 ms
41,636 KB
testcase_38 AC 90 ms
36,644 KB
testcase_39 AC 89 ms
36,644 KB
testcase_40 AC 84 ms
33,700 KB
testcase_41 AC 94 ms
184,656 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (139 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var p = NList;
        var (h, w) = (p[0], p[1]);
        var r = NList;
        var c = NList;
        var ans = new int[h][];
        for (var i = 0; i < ans.Length; ++i)
        {
            ans[i] = new int[w];
            for (var j = 0; j < w; ++j)
            {
                if (i == 0 && j == 0) ans[i][j] = 2000;
                else if (i == 0) ans[i][j] = j + h - c[j];
                else if (j == 0) ans[i][j] = i + w - r[i];
                else ans[i][j] = i + j;
            }
        }
        WriteLine(string.Join("\n", ans.Select(ai => string.Join(" ", ai))));
    }
}
0