結果

問題 No.1910 High Element on Grid
ユーザー 👑 colognecologne
提出日時 2022-04-22 23:42:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 500 ms
コンパイル使用メモリ 10,932 KB
実行使用メモリ 18,120 KB
最終ジャッジ日時 2023-09-06 10:38:46
合計ジャッジ時間 8,995 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,864 KB
testcase_01 AC 16 ms
7,824 KB
testcase_02 AC 16 ms
7,816 KB
testcase_03 AC 15 ms
7,820 KB
testcase_04 AC 15 ms
7,800 KB
testcase_05 AC 15 ms
7,764 KB
testcase_06 AC 15 ms
7,816 KB
testcase_07 AC 15 ms
7,804 KB
testcase_08 AC 15 ms
7,812 KB
testcase_09 AC 15 ms
7,812 KB
testcase_10 AC 15 ms
7,724 KB
testcase_11 AC 100 ms
15,416 KB
testcase_12 AC 104 ms
15,640 KB
testcase_13 AC 105 ms
15,600 KB
testcase_14 AC 121 ms
16,828 KB
testcase_15 AC 83 ms
14,020 KB
testcase_16 AC 76 ms
13,384 KB
testcase_17 AC 84 ms
13,748 KB
testcase_18 AC 103 ms
15,380 KB
testcase_19 AC 83 ms
13,852 KB
testcase_20 AC 85 ms
13,928 KB
testcase_21 AC 97 ms
15,140 KB
testcase_22 AC 68 ms
12,408 KB
testcase_23 AC 113 ms
16,332 KB
testcase_24 AC 76 ms
13,176 KB
testcase_25 AC 94 ms
14,904 KB
testcase_26 AC 86 ms
14,308 KB
testcase_27 AC 90 ms
14,556 KB
testcase_28 AC 62 ms
12,204 KB
testcase_29 AC 78 ms
13,004 KB
testcase_30 AC 78 ms
13,564 KB
testcase_31 AC 14 ms
7,932 KB
testcase_32 AC 129 ms
18,076 KB
testcase_33 AC 133 ms
18,076 KB
testcase_34 AC 129 ms
17,976 KB
testcase_35 AC 134 ms
18,120 KB
testcase_36 AC 15 ms
8,244 KB
testcase_37 AC 71 ms
12,940 KB
testcase_38 AC 35 ms
10,088 KB
testcase_39 AC 35 ms
10,092 KB
testcase_40 AC 17 ms
8,460 KB
testcase_41 AC 40 ms
10,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    H, W = map(int, input().split())
    *R, = map(int, input().split())
    *C, = map(int, input().split())

    V = [[i * W + j + 1 for j in range(W)] for i in range(H)]
    for i in range(1, H):
        V[i][0] = V[i][W - R[i]]
    for i in range(1, W):
        V[0][i] = V[H - C[i]][i]
    V[0][0] = V[-1][-1]

    for x in V:
        print(*x)


if __name__ == '__main__':
    main()
0