結果

問題 No.1910 High Element on Grid
ユーザー chineristACchineristAC
提出日時 2021-10-16 17:37:58
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 536 bytes
コンパイル時間 1,116 ms
コンパイル使用メモリ 86,656 KB
実行使用メモリ 79,952 KB
最終ジャッジ日時 2023-09-04 19:10:08
合計ジャッジ時間 13,928 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
71,888 KB
testcase_01 AC 88 ms
71,956 KB
testcase_02 AC 87 ms
72,072 KB
testcase_03 AC 87 ms
71,980 KB
testcase_04 AC 89 ms
71,560 KB
testcase_05 AC 90 ms
71,736 KB
testcase_06 AC 87 ms
71,584 KB
testcase_07 AC 89 ms
71,700 KB
testcase_08 AC 90 ms
71,712 KB
testcase_09 AC 90 ms
71,880 KB
testcase_10 AC 91 ms
71,724 KB
testcase_11 AC 146 ms
79,320 KB
testcase_12 AC 130 ms
79,496 KB
testcase_13 AC 129 ms
79,108 KB
testcase_14 AC 132 ms
79,704 KB
testcase_15 AC 125 ms
79,256 KB
testcase_16 AC 122 ms
79,264 KB
testcase_17 AC 126 ms
79,100 KB
testcase_18 AC 130 ms
79,376 KB
testcase_19 AC 124 ms
79,096 KB
testcase_20 AC 126 ms
79,296 KB
testcase_21 AC 131 ms
79,184 KB
testcase_22 AC 130 ms
78,940 KB
testcase_23 AC 131 ms
79,600 KB
testcase_24 AC 125 ms
78,952 KB
testcase_25 AC 129 ms
79,612 KB
testcase_26 AC 127 ms
79,400 KB
testcase_27 AC 127 ms
79,176 KB
testcase_28 AC 124 ms
78,860 KB
testcase_29 AC 125 ms
78,836 KB
testcase_30 AC 124 ms
79,008 KB
testcase_31 AC 93 ms
71,812 KB
testcase_32 AC 142 ms
79,876 KB
testcase_33 AC 140 ms
79,952 KB
testcase_34 AC 142 ms
79,848 KB
testcase_35 AC 140 ms
79,932 KB
testcase_36 AC 104 ms
77,760 KB
testcase_37 AC 121 ms
79,072 KB
testcase_38 AC 113 ms
78,248 KB
testcase_39 AC 110 ms
78,116 KB
testcase_40 AC 103 ms
77,316 KB
testcase_41 AC 115 ms
78,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

H,W = mi()
R = li()
C = li()

A = [[0 for j in range(W)] for i in range(H)]

A[0][0] = 2*H*W
for i in range(1,H):
    A[i][0] = i*2*W

for j in range(1,W):
    for i in range(1,H):
        if j < R[i]:
            A[i][j] = A[i][j-1] + 1
        else:
            A[i][j] = A[i][j-1]
    if C[j]==1:
        A[0][j] = 2*H*W
    else:
        A[0][j] = A[1-C[j]][j]-1

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