結果

問題 No.1034 テスターのふっぴーさん
ユーザー Geckoちゃん
提出日時 2020-05-04 15:11:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 560 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 50,908 KB
最終ジャッジ日時 2024-06-24 09:42:34
合計ジャッジ時間 16,257 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 20 TLE * 1 -- * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())

N = 4
SIZE0 = 4*N-4
N=N-2
SIZE1 = 4*N-4

N,i,j=map(int, input().split())
# depth position estimate
depth = min([min([i, (N-1)-i]), min([j, (N-1)-j])])
# print(depth)

cum_size = 0
for d in range(depth):
    cum_size += 4*N-4
    N=N-2

# print(cum_size)
import numpy as np
tmp = np.zeros((N, N)).astype(int)

tmp[0,:] = [n for n in range(N)]
tmp[:,N-1] = [n+N-1 for n in range(N)]
tmp[N-1,:] = list(reversed([n+2*(N-1) for n in range(N)]))
for n in range(N-1):
    tmp[N-1-n,0] =n+3*(N-1)
# print(tmp)


print(tmp[j-depth, i-depth] + cum_size)
0