結果
| 問題 | No.94 圏外です。(EASY) |
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2021-10-23 17:28:47 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 5,000 ms |
| コード長 | 605 bytes |
| 記録 | |
| コンパイル時間 | 3,020 ms |
| コンパイル使用メモリ | 274,856 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-23 11:25:42 |
| 合計ジャッジ時間 | 4,274 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}
沙耶花