This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
struct pp{int x,y;}fish[101];int m;int fish_count(int x,int y,int p,int q){int i,cnt=0;for(i=1;i<=m;i++)if(x<=fish[i].x && fish[i].x<=p && y<=fish[i].y && fish[i].y<=q)cnt++;return cnt;}int main(){int n,l,i,j,k,t,ans=0;scanf("%d %d %d",&n,&l,&m);for(i=1;i<=m;i++)scanf("%d %d",&fish[i].x,&fish[i].y);for(i=1;i<=m;i++){for(j=1;j<=m;j++){for(k=1;k<l/2;k++){t=fish_count(fish[i].x,fish[j].y,fish[i].x+k,fish[j].y+(l/2-k));if(t>ans) ans=t;}}}printf("%d",ans);}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |