This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
typedef long long ll;
using namespace std;
int n,k;
void solve()
{
cin >> n >> k;
ll mnx = 0;
ll mxx = 0;
ll mny = 0;
ll mxy = 0;
for(int i=0;i<n;i++)
{
ll x,y;
cin >> x >> y;
if(i==0)
{
mnx = mxx = x;
mny = mxy = y;
}
else
{
mnx = min(mnx,x);
mxx = max(mxx,x);
mny = min(mny,y);
mxy = max(mxy,y);
}
}
ll tmp = max(mxx-mnx,mxy-mny);
cout << mnx << " " << mny << " " << max(tmp,1LL) << endl;
return;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
solve();
return 0;
}
# | 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... |