結果

問題 No.1910 High Element on Grid
ユーザー mkawa2mkawa2
提出日時 2022-04-23 01:02:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 995 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 11,072 KB
実行使用メモリ 17,332 KB
最終ジャッジ日時 2023-09-06 11:57:24
合計ジャッジ時間 9,161 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,312 KB
testcase_01 AC 15 ms
8,320 KB
testcase_02 AC 15 ms
8,344 KB
testcase_03 AC 15 ms
8,236 KB
testcase_04 AC 16 ms
8,244 KB
testcase_05 AC 16 ms
7,808 KB
testcase_06 AC 16 ms
7,940 KB
testcase_07 AC 16 ms
7,996 KB
testcase_08 AC 16 ms
8,216 KB
testcase_09 AC 15 ms
8,352 KB
testcase_10 AC 16 ms
8,156 KB
testcase_11 AC 97 ms
14,384 KB
testcase_12 AC 101 ms
14,588 KB
testcase_13 AC 101 ms
14,888 KB
testcase_14 AC 115 ms
15,876 KB
testcase_15 AC 82 ms
12,976 KB
testcase_16 AC 74 ms
12,516 KB
testcase_17 AC 81 ms
12,964 KB
testcase_18 AC 98 ms
14,332 KB
testcase_19 AC 81 ms
13,040 KB
testcase_20 AC 81 ms
12,988 KB
testcase_21 AC 94 ms
14,024 KB
testcase_22 AC 66 ms
11,712 KB
testcase_23 AC 107 ms
15,384 KB
testcase_24 AC 72 ms
12,184 KB
testcase_25 AC 91 ms
14,056 KB
testcase_26 AC 85 ms
13,232 KB
testcase_27 AC 90 ms
13,848 KB
testcase_28 AC 60 ms
11,124 KB
testcase_29 AC 72 ms
12,184 KB
testcase_30 AC 79 ms
12,880 KB
testcase_31 AC 16 ms
8,172 KB
testcase_32 AC 132 ms
17,284 KB
testcase_33 AC 130 ms
17,320 KB
testcase_34 AC 132 ms
17,332 KB
testcase_35 AC 131 ms
17,324 KB
testcase_36 AC 17 ms
8,348 KB
testcase_37 AC 71 ms
12,224 KB
testcase_38 AC 36 ms
9,392 KB
testcase_39 AC 36 ms
9,252 KB
testcase_40 AC 19 ms
8,524 KB
testcase_41 AC 43 ms
10,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(200005)
int1 = lambda x: int(x)-1
pDB = lambda *x: print(*x, end="\n", file=sys.stderr)
p2D = lambda x: print(*x, sep="\n", end="\n\n", file=sys.stderr)
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def SI(): return sys.stdin.readline().rstrip()
dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
inf = (1 << 63)-1
# inf = (1 << 31)-1
md = 10**9+7
# md = 998244353

h, w = LI()
rr = LI()
cc = LI()

aa = [[i+j for j in range(w)] for i in range(h)]
aa[0][0] = 10**9

for i, r in enumerate(rr):
    if i == 0: continue
    aa[i][0] = w-r+i

for i, c in enumerate(cc):
    if i == 0: continue
    aa[0][i] = h-c+i

for row in aa: print(*row)
0