結果
| 問題 | No.168 ものさし |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-03 03:12:29 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 575 bytes |
| 記録 | |
| コンパイル時間 | 417 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 32,344 KB |
| 最終ジャッジ日時 | 2026-06-02 23:07:37 |
| 合計ジャッジ時間 | 7,117 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | TLE * 1 -- * 18 |
ソースコード
n = int(input())
xy = [list(map(int,input().split())) for i in range(n)]
import math
def naga(x1,x2):
d = math.sqrt((xy[x1][1]-xy[x2][1])**2+(xy[x1][0]-xy[x2][0])**2)
return d
l = 0
r = naga(0,-1)//10+2
while r>=l:
mid = (r+l)//2
visi = [False]*n
d = []
d.append(0)
while d:
pos = d.pop(0)
visi[pos] = True
for i in range(n):
if i == pos: continue
if naga(i,pos)<mid*10 and visi[i] == False:
d.append(i)
if visi[-1]:
r = mid-1
else:
l = mid+1
print(int(l*10))