-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path102951A.cpp
More file actions
31 lines (28 loc) · 719 Bytes
/
102951A.cpp
File metadata and controls
31 lines (28 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fo(i,n) for(int i = 0; i < n; i++)
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define endl '\n'
long long dist(long long x1,long long y1,long long x2,int y2){
float del_x= x1-x2;
float del_y = y1-y2;
return del_x*del_x+del_y*del_y;
}
int main() {_
int n;
cin >> n;
long long max_dist = 0;
vector<long long>x(n),y(n);
fo(i,n) cin >> x[i];
fo(i,n) cin >> y[i];
for(int i = 0;i<n;i++){
for(int j =0;j<n;j++){
max_dist=max(max_dist,dist(x[i],y[i],x[j],y[j]));
}
}
cout <<max_dist<<endl;
return 0;
}