Submission #16237

#TimeUsernameProblemLanguageResultExecution timeMemory
16237eaststar고기잡이 (KOI13_fish)C++14
18 / 18
108 ms1084 KiB
#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; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...