Submission #1002928

# Submission time Handle Problem Language Result Execution time Memory
1002928 2024-06-19T21:25:54 Z Lobo Izvanzemaljci (COI21_izvanzemaljci) C++17
5 / 100
63 ms 412 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define all(x) x.begin(),x.end()
const int inf = 1e18+10;

pair<pair<int,int>,int> sqr(int x0, int x1, int y0, int y1) {
	int l = max({(int) 1,x1-x0,y1-y0});
	return mp(mp(x0,y0),l);
}

int32_t main() {
	// #ifndef ONLINE_JUDGE
	// freopen("in.in","r",stdin);
	// freopen("out.out","w",stdout);
	// #endif

	int n,k;
	cin >> n >> k;

	if(k == 1) {	
		int minx = inf,miny=inf,maxx = -inf,maxy = -inf;
		for(int i = 0; i < n; i++) {
			int x,y;
			cin >> x >> y;
			minx = min(x,minx);
			maxx = max(x,maxx);
			miny = min(y,miny);
			maxy = max(y,maxy);
		}
		auto a = sqr(minx,maxx,miny,maxy);
		cout << a.fr.fr << " " << a.fr.sc << " " << a.sc << endl;
	}
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 49 ms 404 KB Output is correct
8 Correct 50 ms 348 KB Output is correct
9 Correct 49 ms 412 KB Output is correct
10 Correct 43 ms 348 KB Output is correct
11 Correct 63 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -