結果

問題 No.1910 High Element on Grid
ユーザー titiatitia
提出日時 2023-10-08 02:51:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 193 ms / 2,000 ms
コード長 464 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 11,000 KB
実行使用メモリ 18,324 KB
最終ジャッジ日時 2023-10-08 02:52:00
合計ジャッジ時間 13,225 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,920 KB
testcase_01 AC 16 ms
7,856 KB
testcase_02 AC 16 ms
7,804 KB
testcase_03 AC 18 ms
7,824 KB
testcase_04 AC 16 ms
7,788 KB
testcase_05 AC 16 ms
7,864 KB
testcase_06 AC 16 ms
7,848 KB
testcase_07 AC 16 ms
7,884 KB
testcase_08 AC 16 ms
7,916 KB
testcase_09 AC 16 ms
7,788 KB
testcase_10 AC 16 ms
7,952 KB
testcase_11 AC 125 ms
15,176 KB
testcase_12 AC 132 ms
15,668 KB
testcase_13 AC 129 ms
15,680 KB
testcase_14 AC 151 ms
16,980 KB
testcase_15 AC 108 ms
14,196 KB
testcase_16 AC 95 ms
13,388 KB
testcase_17 AC 133 ms
14,104 KB
testcase_18 AC 129 ms
15,512 KB
testcase_19 AC 105 ms
13,932 KB
testcase_20 AC 104 ms
14,004 KB
testcase_21 AC 121 ms
15,108 KB
testcase_22 AC 85 ms
12,536 KB
testcase_23 AC 141 ms
15,916 KB
testcase_24 AC 93 ms
13,272 KB
testcase_25 AC 119 ms
14,792 KB
testcase_26 AC 110 ms
14,396 KB
testcase_27 AC 117 ms
14,776 KB
testcase_28 AC 77 ms
12,224 KB
testcase_29 AC 93 ms
13,252 KB
testcase_30 AC 100 ms
13,828 KB
testcase_31 AC 16 ms
7,876 KB
testcase_32 AC 170 ms
18,180 KB
testcase_33 AC 174 ms
18,256 KB
testcase_34 AC 171 ms
18,324 KB
testcase_35 AC 193 ms
18,236 KB
testcase_36 AC 17 ms
8,348 KB
testcase_37 AC 93 ms
13,068 KB
testcase_38 AC 45 ms
10,192 KB
testcase_39 AC 44 ms
9,844 KB
testcase_40 AC 21 ms
8,528 KB
testcase_41 AC 52 ms
10,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

H,W=map(int,input().split())
R=list(map(int,input().split()))
C=list(map(int,input().split()))

ANS=[[0]*W for i in range(H)]


now=2
for i in range(1,H):
    for j in range(1,W):
        ANS[i][j]=now
        now+=2

ANS[0][0]=10**9

for i in range(1,H):
    x=R[i]

    k=ANS[i][W-1-(x-1)]
    ANS[i][0]=k+1

for j in range(1,W):
    x=C[j]

    k=ANS[H-1-(x-1)][j]
    ANS[0][j]=k+1

for i in range(H):
    print(*ANS[i])
0