結果
問題 |
No.94 圏外です。(EASY)
|
ユーザー |
![]() |
提出日時 | 2021-10-23 17:28:47 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 20 ms / 5,000 ms |
コード長 | 605 bytes |
コンパイル時間 | 4,601 ms |
コンパイル使用メモリ | 251,372 KB |
最終ジャッジ日時 | 2025-01-25 04:55:24 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <stdio.h> #include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ int n; cin>>n; dsu D(n); vector<int> x(n),y(n); rep(i,n)cin>>x[i]>>y[i]; rep(i,n){ rep(j,n){ if((x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]) <= 100)D.merge(i,j); } } double ans = 1.0; rep(i,n){ rep(j,n){ if(D.same(i,j)){ ans = max(ans,2.0 + hypot(x[i]-x[j],y[i]-y[j])); } } } cout<<fixed<<setprecision(10)<<ans<<endl; return 0; }