#include<bits/stdc++.h>
#pragma GCC optimize("O2")
#define deb(x) cout << #x << " = " << x <<endl
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define all(c) c.begin(), c.end()
#define endl "\n"
#define sz(u) (int)(u.size())
#define L(x)(2*x)
#define R(x)(2*x+1)
#define M(x,y)((x+y)/2)
#define int long long
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
int n,k;
vector<int> get(vector<pair<int,int>> pnt){
int mnx=1e16,mny=1e16,mxx=-1e16,mxy=-1e16;
for(int i=0;i<n;i++){
mxx=max(mxx,pnt[i].F);
mxy=max(mxy,pnt[i].S);
mnx=min(mnx,pnt[i].F);
mny=min(mny,pnt[i].S);
}
vector<int> ans={mnx,mny,max({mxx-mnx,mxy-mny,1LL})};
return ans;
}
void solve(){
cin>>n>>k;
vector<pair<int,int>> pnt(n);
for(auto &x:pnt)
cin>>x.F>>x.S;
if(k==1){
vector<int> ans=get(pnt);
for(auto x:ans)
cout<<x<<" ";
return ;
}
if(k==3){
//for(int )
}
}
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
solve();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
29 ms |
3444 KB |
Output is correct |
8 |
Correct |
29 ms |
3400 KB |
Output is correct |
9 |
Correct |
35 ms |
3396 KB |
Output is correct |
10 |
Correct |
28 ms |
3404 KB |
Output is correct |
11 |
Correct |
35 ms |
3412 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Unexpected end of file - int64 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Unexpected end of file - int64 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Unexpected end of file - int64 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Unexpected end of file - int64 expected |
2 |
Halted |
0 ms |
0 KB |
- |