結果

問題 No.168 ものさし
ユーザー tailstails
提出日時 2019-09-04 00:42:50
言語 cLay
(20240104-1)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 2,648 ms
コンパイル使用メモリ 178,212 KB
実行使用メモリ 19,864 KB
最終ジャッジ日時 2023-09-19 00:25:34
合計ジャッジ時間 4,322 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
11,660 KB
testcase_01 AC 2 ms
7,572 KB
testcase_02 AC 3 ms
7,352 KB
testcase_03 AC 2 ms
7,596 KB
testcase_04 AC 3 ms
7,568 KB
testcase_05 AC 2 ms
7,368 KB
testcase_06 AC 2 ms
7,472 KB
testcase_07 AC 2 ms
7,564 KB
testcase_08 AC 2 ms
7,352 KB
testcase_09 AC 3 ms
7,488 KB
testcase_10 AC 3 ms
7,696 KB
testcase_11 AC 13 ms
11,464 KB
testcase_12 AC 40 ms
17,728 KB
testcase_13 AC 57 ms
19,656 KB
testcase_14 AC 58 ms
19,736 KB
testcase_15 AC 3 ms
7,524 KB
testcase_16 AC 3 ms
7,468 KB
testcase_17 AC 3 ms
7,556 KB
testcase_18 AC 5 ms
7,992 KB
testcase_19 AC 55 ms
19,864 KB
testcase_20 AC 57 ms
19,732 KB
testcase_21 AC 58 ms
19,640 KB
testcase_22 AC 57 ms
19,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll n,x[1000],y[1000],k,m,r;
pair<ll,pair<ll,ll>> a[600000];
unionFind u;
{
	rd(n,(x,y)(n));
	rep(i,n)rep(j,i)a[m++]={(x[i]-x[j])**2+(y[i]-y[j])**2,{j,i}};
	sort(a,a+m);
	u.walloc(n);
	u.init();
	for(;u.connect(a[k].second.first,a[k].second.second),u.get(0)!=u.get(n-1);)++k;
	r=2**31-1;
	rep(i,31)if((r-2**(30-i))**2>=a[k].first)r-=2**(30-i);
	wt(r/+10*10);
}
0