Submission #5289153
Source Code Expand
#pragma region _head
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<map>
#include<set>
#include<iomanip>
#include<queue>
#include<stack>
#include<numeric>
#include<utility>
#include<regex>
void Init() {
std::cin.tie(0); std::ios::sync_with_stdio(false);
struct Init_caller { Init_caller() { Init(); } }caller;
}
#pragma region _define
#define int LL
#define f(i,a,b) for(LL i=a;i<b;i++)
#define rep(i,n) for(LL i=0;i<n;i++)
#define rep2(i,j,a,h,w) for(LL i=0;i<h;i++)for(LL j=0;j<w;j++)cin>>a[i][j]
#define f_vI(v,n) f(i,0,n)cin>>v[i]
#define f_v2I(v1,v2,n) f(i,0,n)cin>>v1[i]>>v2[i]
#define f_v3I(v1,v2,v3,n) f(i,0,n)cin>>v1[i]>>v2[i]>>v3[i]
#define f_vO(v,n) f(i,0,n)cout<<v[i]<<endl
#define ei else if
#define all(a) a.begin(),a.end()
#define size(s) ((LL)s.size())
#define F first
#define S second
#define check() cout<<"! ! !"
#define endl "\n"
#define _y() cout<<"Yes"<<endl
#define _Y() cout<<"YES"<<endl
#define _n() cout<<"No"<<endl
#define _N() cout<<"NO"<<endl
#define INT_INF 1<<29
#define LL_INF 1LL<<60
#define MOD 1000000007
#pragma endregion
#pragma region _using
using namespace std;
using LL = long long;
using st = string;
using vi = vector<LL>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vd = vector<double>;
using vvd = vector<vd>;
using vvvd = vector<vvd>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<st>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
using qi = queue<LL>;
using qc = queue<char>;
using qs = queue<st>;
using si = stack<LL>;
using sc = stack<char>;
using ss = stack<st>;
using pi = pair<LL, LL>;
using ppi = pair<pi, LL>;
using mll = map<LL, LL>;
using mcl = map<char, LL>;
using vpi = vector<pi>;
using vppi = vector<ppi>;
#pragma endregion
struct edge {
int f, t, c; // from, to, cost
};
void y_n(bool p) {
p ? _y() : _n();
}
void Y_N(bool p) {
p ? _Y() : _N();
}
LL vmax(vi v, LL n) {
int MAX = 0;
f(i, 0, n) {
MAX = max(MAX, v[i]);
}
return MAX;
}
LL vmin(vi v, LL n) {
int MIN = LL_INF;
f(i, 0, n) {
MIN = min(MIN, v[i]);
}
return MIN;
}
LL gcd(LL a, LL b) {
if (b == 0) {
swap(a, b);
}
LL r;
while ((r = a % b) != 0) {
a = b;
b = r;
}
return b;
}
LL lcm(LL a, LL b) {
return (a / gcd(a, b) * b);
}
//素数判定
bool is_prime(int n) {
for (int i = 2; i*i <= n; i++) {
if (n % i == 0) {
return false;
}
}
return true;
}
//素因数分解
void dec_prime(int n) {
int a = 2;
while (a*a <= n) {
if (n % a == 0) {
cout << a << endl;
n /= a;
}
else {
a++;
}
}
cout << n << endl;
}
//エラトステネスの篩
void sieve_prime(LL n) {
vb s(n + 1, true);
f(i, 2, n + 1) {
for (int j = 2; i*j <= n; j++) {
s[i*j] = false;
}
}
cout << "2から" << n << "までの素数" << endl;
f(i, 2, n + 1) {
if (s[i]) {
cout << i << " ";
}
}
}
//階乗計算
LL factorial(LL n) {
LL a = 1, ret = 1;
while (a < n) {
a++;
ret *= a;
ret %= MOD;
}
return ret;
}
#pragma endregion
/*****************************************************************************/
signed main() {
int n;
cin >> n;
vi x(n), y(n);
f_v2I(x, y, n);
double ans = 0;
rep(i, n) {
rep(j, n) {
ans = max(ans, sqrt(pow(x[j] - x[i], 2) + pow(y[j] - y[i], 2)));
}
}
cout << fixed << setprecision(9) << ans;
return 0;
}
Submission Info
Judge Result
Set Name |
All |
Score / Max Score |
100 / 100 |
Status |
|
Set Name |
Test Cases |
All |
00_max.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt, 01_rnd_00.txt, 01_rnd_01.txt, 01_rnd_02.txt, 01_rnd_03.txt, 01_rnd_04.txt, 01_rnd_05.txt, 01_rnd_06.txt, 01_rnd_07.txt, 01_rnd_08.txt, 01_rnd_09.txt, 01_rnd_10.txt, 01_rnd_11.txt, 01_rnd_12.txt, 01_rnd_13.txt, 01_rnd_14.txt, 01_rnd_15.txt, 01_rnd_16.txt, 01_rnd_17.txt, 01_rnd_18.txt, 01_rnd_19.txt |
Case Name |
Status |
Exec Time |
Memory |
00_max.txt |
AC |
1 ms |
256 KB |
00_sample_01.txt |
AC |
1 ms |
256 KB |
00_sample_02.txt |
AC |
1 ms |
256 KB |
00_sample_03.txt |
AC |
1 ms |
256 KB |
00_sample_04.txt |
AC |
1 ms |
256 KB |
00_sample_05.txt |
AC |
1 ms |
256 KB |
01_rnd_00.txt |
AC |
1 ms |
256 KB |
01_rnd_01.txt |
AC |
1 ms |
256 KB |
01_rnd_02.txt |
AC |
1 ms |
256 KB |
01_rnd_03.txt |
AC |
1 ms |
256 KB |
01_rnd_04.txt |
AC |
1 ms |
256 KB |
01_rnd_05.txt |
AC |
1 ms |
256 KB |
01_rnd_06.txt |
AC |
1 ms |
256 KB |
01_rnd_07.txt |
AC |
1 ms |
256 KB |
01_rnd_08.txt |
AC |
1 ms |
256 KB |
01_rnd_09.txt |
AC |
1 ms |
256 KB |
01_rnd_10.txt |
AC |
1 ms |
256 KB |
01_rnd_11.txt |
AC |
1 ms |
256 KB |
01_rnd_12.txt |
AC |
1 ms |
256 KB |
01_rnd_13.txt |
AC |
1 ms |
256 KB |
01_rnd_14.txt |
AC |
1 ms |
256 KB |
01_rnd_15.txt |
AC |
1 ms |
256 KB |
01_rnd_16.txt |
AC |
1 ms |
256 KB |
01_rnd_17.txt |
AC |
1 ms |
256 KB |
01_rnd_18.txt |
AC |
1 ms |
256 KB |
01_rnd_19.txt |
AC |
1 ms |
256 KB |