Submission #420469

# Submission time Handle Problem Language Result Execution time Memory
420469 2021-06-08T11:39:04 Z Nicholas_Patrick Izvanzemaljci (COI21_izvanzemaljci) C++17
5 / 100
38 ms 3100 KB
#include <cstdio>
#include <queue>
#include <algorithm>
using namespace std;

struct point{
	int x, y;
};
struct capture{
	int x, y, l;
};
vector<int> solution;
int solve(vector<point>& points, int k){
	return 0;
}
int main(){
	int n, k;
	scanf("%d%d", &n, &k);
	if(k==1){
		vector<int> x(n), y(n);
		for(int i=n; i--;)
			scanf("%d%d", &x[i], &y[i]);
		int xmin=*min_element(x.begin(), x.end());
		int xmax=*max_element(x.begin(), x.end());
		int ymin=*min_element(y.begin(), y.end());
		int ymax=*max_element(y.begin(), y.end());
		int l=max(1, max(xmax-xmin, ymax-ymin));
		printf("%d %d %d\n", xmin, ymin, l);
	}else if(k==2){
	}else if(k==3){
	}
}

Compilation message

izvanzemaljci.cpp: In function 'int main()':
izvanzemaljci.cpp:18:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |  scanf("%d%d", &n, &k);
      |  ~~~~~^~~~~~~~~~~~~~~~
izvanzemaljci.cpp:22:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   22 |    scanf("%d%d", &x[i], &y[i]);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 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 38 ms 2964 KB Output is correct
8 Correct 30 ms 3084 KB Output is correct
9 Correct 31 ms 3084 KB Output is correct
10 Correct 32 ms 2964 KB Output is correct
11 Correct 30 ms 3100 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -