#include using namespace std; #define int long long int32_t main(){ int n; cin>>n; vector x(n),y(n),t(n); for(int i=0;i>x[i]>>y[i]>>t[i]; int high,low; high=1e9;low=0; while(high-low>1){ int mid=(high+low)/2; queue que; que.push(0); vector dist(n,1e9); dist[0]=0; while(!que.empty()){ int px=que.front(); que.pop(); for(int i=0;i0.00001){ double mq=(hq+lq)/2.0; if(mq*mq>(double)4.0*a*b){ hq=mq; }else{ lq=mq; } } d=(double)a+b-lq; }else{ d=(x[i ]-x[px])*(x[i ]-x[px]) + (y[i ]-y[px])*(y[i ]-y[px]); } if(d<=mid && dist[i]>dist[px]+1 ){ dist[i]=dist[px]+1; que.push(i); } } } if(dist[n-1]==1e9){ low=mid; }else{ high=mid; } } cout<