#include <stdio.h>
struct Data{
int x,y;
}a[110];
int x[110],y[110];
int main(){
int i,j,k,p,n,l,m,s,ans=0;
scanf("%d%d%d",&n,&l,&m);
for(i=1;i<=m;++i){
scanf("%d%d",&a[i].x,&a[i].y);
x[i]=a[i].x;
y[i]=a[i].y;
}
l/=2;
for(i=1;i<=m;++i){
for(j=1;j<=m;++j){
for(k=1;k<l;++k){
s=0;
for(p=1;p<=m;++p){
if(a[p].x<x[i]||a[p].x>x[i]+k||a[p].y<y[j]||a[p].y>y[j]+l-k)continue;
++s;
}
if(ans<s)ans=s;
}
}
}
printf("%d",ans);
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1084 KB |
Output is correct |
2 |
Correct |
0 ms |
1084 KB |
Output is correct |
3 |
Correct |
0 ms |
1084 KB |
Output is correct |
4 |
Correct |
0 ms |
1084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1084 KB |
Output is correct |
2 |
Correct |
0 ms |
1084 KB |
Output is correct |
3 |
Correct |
0 ms |
1084 KB |
Output is correct |
4 |
Correct |
4 ms |
1084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
1084 KB |
Output is correct |
2 |
Correct |
9 ms |
1084 KB |
Output is correct |
3 |
Correct |
22 ms |
1084 KB |
Output is correct |
4 |
Correct |
47 ms |
1084 KB |
Output is correct |
5 |
Correct |
1 ms |
1084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1084 KB |
Output is correct |
2 |
Correct |
75 ms |
1084 KB |
Output is correct |
3 |
Correct |
76 ms |
1084 KB |
Output is correct |
4 |
Correct |
53 ms |
1084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
108 ms |
1084 KB |
Output is correct |
2 |
Correct |
56 ms |
1084 KB |
Output is correct |
3 |
Correct |
96 ms |
1084 KB |
Output is correct |
4 |
Correct |
108 ms |
1084 KB |
Output is correct |