Submission #1002871

# Submission time Handle Problem Language Result Execution time Memory
1002871 2024-06-19T20:56:05 Z gabistroeh Izvanzemaljci (COI21_izvanzemaljci) C++14
5 / 100
51 ms 2448 KB
#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 = -inf, maxy = -inf, 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);
	if(l==0) l = 1;
	cout << minx << " " << miny << " " << l;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 600 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 348 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 49 ms 2440 KB Output is correct
8 Correct 51 ms 2388 KB Output is correct
9 Correct 51 ms 2448 KB Output is correct
10 Correct 49 ms 2388 KB Output is correct
11 Correct 49 ms 2196 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 1 ms 448 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 -