結果

問題 No.2179 Planet Traveler
ユーザー tailstails
提出日時 2023-01-08 02:36:54
言語 cLay
(20240104-1)
結果
AC  
実行時間 8 ms / 3,000 ms
コード長 449 bytes
コンパイル時間 2,592 ms
コンパイル使用メモリ 172,776 KB
実行使用メモリ 8,612 KB
最終ジャッジ日時 2023-08-21 15:21:33
合計ジャッジ時間 3,986 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,384 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,384 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,384 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 5 ms
8,408 KB
testcase_12 AC 6 ms
8,472 KB
testcase_13 AC 5 ms
8,412 KB
testcase_14 AC 6 ms
8,612 KB
testcase_15 AC 8 ms
8,400 KB
testcase_16 AC 8 ms
8,412 KB
testcase_17 AC 8 ms
8,544 KB
testcase_18 AC 8 ms
8,544 KB
testcase_19 AC 6 ms
8,476 KB
testcase_20 AC 3 ms
6,560 KB
testcase_21 AC 8 ms
8,188 KB
testcase_22 AC 5 ms
7,580 KB
testcase_23 AC 4 ms
7,052 KB
testcase_24 AC 7 ms
7,888 KB
testcase_25 AC 5 ms
7,348 KB
testcase_26 AC 5 ms
8,352 KB
testcase_27 AC 3 ms
6,572 KB
testcase_28 AC 4 ms
6,724 KB
testcase_29 AC 7 ms
7,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll d[800][800],x[800],y[800],t[800];
ll@n;
rep(i,n){
	ll@xi,@yi,@ti;
	x[i]=xi;
	y[i]=yi;
	t[i]=ti;
	ll xyi=xi*xi+yi*yi;
	rep(j,i){
		ll xj=x[j];
		ll yj=y[j];
		ll tj=t[j];
		d[i][j]=d[j][i]=
			ti==tj ?
			(xj-xi)*(xj-xi)+(yj-yi)*(yj-yi) :
			({ ll xyj=xj*xj+yj*yj; xyi+xyj-Isqrt(4*xyi*xyj); });
	}
}
DijkstraHeap<ll>h;
h.malloc(n,1);
h.change(0,0);
for(ll i;i=h.pop(),i!=n-1;){
	rep(j,n){
		h.change(j,max(h.val[i],d[i][j]));
	}
}
wt(h.val[n-1]);
0