#include<stdio.h>
int n, l, m;
int fish[102][4];
int max;
int input()
{
int i, x=2100000000, y=2100000000;
scanf("%d %d %d",&n,&l,&m);
for(i=1 ; i<=n ; i++)
{
scanf("%d %d",&fish[i][1],&fish[i][2]);
if(fish[i][1]<x) x=fish[i][1];
if(fish[i][2]<y) y=fish[i][2];
}
fish[0][1]=x;
fish[0][2]=y;
return 0;
}
int process()
{
int i, j, k, r=0;
int a, b;
for(i=0 ; i<=m ; i++)
{
for(j=1 ; j<=l/2 ; j++)
{
r=0;
a=j;
b=l/2-j;
k=fish[i][1]+a;
k-=n;
if(k>0) b+=k, a-=k;
if(b+fish[i][2]>n) b=n;
for(k=1 ; k<=m ; k++)
{
if(fish[k][1]>=fish[i][1] && fish[k][1]<=fish[i][1]+a && fish[k][2]>=fish[i][2] && fish[k][2]<=fish[i][2]+b)
{
r++;
}
}
if(max<r) max=r;
}
}
return 0;
}
int output()
{
printf("%d",max);
return 0;
}
int main()
{
input();
process();
output();
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1088 KB |
Output is correct |
2 |
Correct |
0 ms |
1088 KB |
Output is correct |
3 |
Correct |
0 ms |
1088 KB |
Output is correct |
4 |
Correct |
0 ms |
1088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1088 KB |
Output is correct |
2 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
4 ms |
1084 KB |
SIGSEGV Segmentation fault |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
1084 KB |
SIGSEGV Segmentation fault |
2 |
Halted |
0 ms |
0 KB |
- |