#include <stdio.h>
#define N 100000
#define INF 0x3f3f3f3f
int min(int a, int b) { return a < b ? a : b; }
int max(int a, int b) { return a > b ? a : b; }
int main() {
static int xx[N], yy[N];
int n, k, i, xmn, xmx, ymn, ymx;
scanf("%d%d", &n, &k);
xmn = INF, xmx = -INF, ymn = INF, ymx = -INF;
for (i = 0; i < n; i++) {
scanf("%d%d", &xx[i], &yy[i]);
xmn = min(xmn, xx[i]), xmx = max(xmx, xx[i]);
ymn = min(ymn, yy[i]), ymx = max(ymx, yy[i]);
}
printf("%d %d %d\n", xmn, ymn, max(xmx - xmn, ymx - ymn));
return 0;
}
Compilation message
izvanzemaljci.c: In function 'main':
izvanzemaljci.c:13:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | scanf("%d%d", &n, &k);
| ^~~~~~~~~~~~~~~~~~~~~
izvanzemaljci.c:16:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
16 | scanf("%d%d", &xx[i], &yy[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Integer 0 violates the range [1, 2*10^9] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Integer 0 violates the range [1, 2*10^9] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Integer 0 violates the range [1, 2*10^9] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
308 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 |
- |