# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
4567 |
2013-11-01T15:50:25 Z |
ansol4328 |
고기잡이 (KOI13_fish) |
C++ |
|
12 ms |
1088 KB |
#include<stdio.h>
int n, l, m;
int fish[102][4];
int max;
int input()
{
int i;
scanf("%d %d %d",&n,&l,&m);
for(i=1 ; i<=n ; i++)
{
scanf("%d %d",&fish[i][1],&fish[i][2]);
}
return 0;
}
int process()
{
int i, j, k, r=0;
int a, b;
for(i=1 ; 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;
}
# |
Verdict |
Execution time |
Memory |
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 |
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
12 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
1088 KB |
Output is correct |
2 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |