結果

問題 No.1910 High Element on Grid
ユーザー colognecologne
提出日時 2022-04-22 23:42:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 397 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 20,864 KB
最終ジャッジ日時 2024-06-24 05:14:35
合計ジャッジ時間 7,271 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other AC * 1 RE * 40
権限があれば一括ダウンロードができます

ソースコード

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