結果
| 問題 | No.1034 テスターのふっぴーさん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-04 15:20:36 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 2,000 ms |
| コード長 | 431 bytes |
| コンパイル時間 | 151 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-24 09:56:35 |
| 合計ジャッジ時間 | 2,005 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
Q=int(input())
for q in range(Q):
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])])
ans = N * N - (N - depth * 2) * (N - depth * 2) + 2 * (N - depth * 2 - 1)
dist = (N - depth - 1 - i) + (N - depth - 1 - j)
if i <= j:
ans -= dist
else:
ans += dist
print(ans)