# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1072 |
2013-06-24T16:04:28 Z |
tncks0121 |
고기잡이 (KOI13_fish) |
C++ |
|
104 ms |
900 KB |
#include <stdio.h>
#include <algorithm>
FILE *in = stdin;
FILE *out = stdout;
#define inside(a, b, c) ((a)<=(c) && (c)<=(b))
int N, M, L;
int X[1000], Y[1000];
int Fx[1000], Fy[1000];
int main(){
int i, j, k;
int w, h;
int cnt;
int ans = 0;
fscanf(in, "%d%d%d", &N, &L, &M);
for (i=0; i<M; i++){
fscanf(in, "%d%d", &Fx[i], &Fy[i]);
X[i] = Fx[i]; Y[i] = Fy[i];
}std::sort(X, X+M);
std::sort(Y, Y+M);
L /= 2;
for (w=1; w<L; w++){
h = L-w;
for (i=0; i<M; i++){
for (j=0; j<M; j++){
cnt = 0;
for (k=0; k<M; k++){
if (inside(X[i], X[i]+w, Fx[k]) &&
inside(Y[j], Y[j]+h, Fy[k]))
cnt ++;
}if (ans<cnt) ans = cnt;
}
}
}fprintf(out, "%d", ans);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
900 KB |
Output is correct |
2 |
Correct |
0 ms |
900 KB |
Output is correct |
3 |
Correct |
0 ms |
900 KB |
Output is correct |
4 |
Correct |
0 ms |
900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
900 KB |
Output is correct |
2 |
Correct |
0 ms |
900 KB |
Output is correct |
3 |
Correct |
0 ms |
900 KB |
Output is correct |
4 |
Correct |
2 ms |
900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
900 KB |
Output is correct |
2 |
Correct |
7 ms |
900 KB |
Output is correct |
3 |
Correct |
19 ms |
900 KB |
Output is correct |
4 |
Correct |
45 ms |
900 KB |
Output is correct |
5 |
Correct |
0 ms |
900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
900 KB |
Output is correct |
2 |
Correct |
72 ms |
900 KB |
Output is correct |
3 |
Correct |
71 ms |
900 KB |
Output is correct |
4 |
Correct |
56 ms |
900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
103 ms |
900 KB |
Output is correct |
2 |
Correct |
54 ms |
900 KB |
Output is correct |
3 |
Correct |
95 ms |
900 KB |
Output is correct |
4 |
Correct |
104 ms |
900 KB |
Output is correct |