답안 #4952

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
4952 2014-01-23T13:24:19 Z hana5505 고기잡이 (KOI13_fish) C++
18 / 18
124 ms 1088 KB
#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);}
# 결과 실행 시간 메모리 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 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 8 ms 1088 KB Output is correct
2 Correct 8 ms 1088 KB Output is correct
3 Correct 20 ms 1088 KB Output is correct
4 Correct 44 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 68 ms 1088 KB Output is correct
3 Correct 68 ms 1088 KB Output is correct
4 Correct 68 ms 1088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 120 ms 1088 KB Output is correct
2 Correct 64 ms 1088 KB Output is correct
3 Correct 88 ms 1088 KB Output is correct
4 Correct 124 ms 1088 KB Output is correct