이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
long long int inf = 3*(1e9 + 10);
long long int maxi(long long int a, long long int b){
if(a>b) return a;
else return b;
}
long long int mini(long long int a, long long int b){
if(a<b) return a;
else return b;
}
int main(){
int n, k;
cin >> n >> k;
long long int maxx = 0, maxy = 0, minx = inf, miny = inf;
for(int i=0; i<n; i++){
long long int x, y;
cin >> x >> y;
minx = mini(x, minx);
miny = mini(y, miny);
maxx = maxi(x, maxx);
maxy = maxi(y, maxy);
}
long long int l = maxi(maxx-minx, maxy-miny);
cout << minx << " " << miny << " " << l;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |