結果

問題 No.1034 テスターのふっぴーさん
ユーザー GeckoちゃんGeckoちゃん
提出日時 2020-05-04 15:11:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 560 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 10,924 KB
実行使用メモリ 37,816 KB
最終ジャッジ日時 2023-09-06 15:18:28
合計ジャッジ時間 8,847 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 TLE -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

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