結果

問題 No.1910 High Element on Grid
ユーザー siganaisiganai
提出日時 2022-04-29 23:46:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 186 ms / 2,000 ms
コード長 595 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 82,844 KB
最終ジャッジ日時 2023-09-11 15:28:08
合計ジャッジ時間 15,510 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
78,424 KB
testcase_01 AC 146 ms
78,768 KB
testcase_02 AC 147 ms
78,468 KB
testcase_03 AC 148 ms
78,436 KB
testcase_04 AC 145 ms
78,492 KB
testcase_05 AC 144 ms
78,760 KB
testcase_06 AC 145 ms
78,444 KB
testcase_07 AC 143 ms
78,608 KB
testcase_08 AC 141 ms
78,360 KB
testcase_09 AC 144 ms
78,680 KB
testcase_10 AC 143 ms
78,484 KB
testcase_11 AC 175 ms
82,084 KB
testcase_12 AC 174 ms
82,232 KB
testcase_13 AC 175 ms
81,920 KB
testcase_14 AC 184 ms
82,232 KB
testcase_15 AC 179 ms
81,972 KB
testcase_16 AC 177 ms
81,608 KB
testcase_17 AC 176 ms
81,564 KB
testcase_18 AC 180 ms
82,056 KB
testcase_19 AC 173 ms
81,688 KB
testcase_20 AC 173 ms
81,664 KB
testcase_21 AC 173 ms
82,028 KB
testcase_22 AC 171 ms
81,376 KB
testcase_23 AC 183 ms
82,236 KB
testcase_24 AC 172 ms
81,396 KB
testcase_25 AC 176 ms
81,860 KB
testcase_26 AC 176 ms
81,708 KB
testcase_27 AC 176 ms
81,748 KB
testcase_28 AC 173 ms
81,124 KB
testcase_29 AC 171 ms
81,764 KB
testcase_30 AC 172 ms
81,632 KB
testcase_31 AC 144 ms
78,540 KB
testcase_32 AC 182 ms
82,844 KB
testcase_33 AC 186 ms
82,704 KB
testcase_34 AC 182 ms
82,740 KB
testcase_35 AC 183 ms
82,748 KB
testcase_36 AC 154 ms
79,972 KB
testcase_37 AC 170 ms
81,416 KB
testcase_38 AC 161 ms
79,912 KB
testcase_39 AC 158 ms
79,912 KB
testcase_40 AC 153 ms
80,016 KB
testcase_41 AC 163 ms
81,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env PyPy3

from collections import Counter, defaultdict, deque
import itertools
import re
import math
from functools import reduce
import operator
import bisect
from heapq import *
import functools
mod=998244353

import sys
input=sys.stdin.readline

h,w=map(int,input().split())
r=list(map(int,input().split()))
c=list(map(int,input().split()))
a = [[0] * w for _ in range(h)]
for i in range(h):
    for j in range(w):
        a[i][j] = i + j + 1
a[0][0] = 10 ** 9
for i in range(1,h):
    a[i][0] += w - r[i]
for i in range(1,w):
    a[0][i] += h - c[i]
for row in a:
    print(*row)
0