# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1108 | hana5505 | 고기잡이 (KOI13_fish) | C++98 | 364 ms | 892 KiB |
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>
#include<algorithm>
using namespace std;
struct pp{
int x,y;
}ar[101],sorted[101];
int n,l,m,dnl[101];
bool cmp(struct pp a,struct pp b)
{
if(a.x==b.x) return a.y<b.y;
return a.x<b.x;
}
int cot(int x,int y,int r)
{
struct pp t,tt;
int h=l/2-r;
int i,j,c=0,tmp;
for(i=x;i<=x+r;i++){
t.x=i;
t.y=y+h;
tt.x=i;
tt.y=y;
c+=lower_bound(sorted+dnl[i]+1,sorted+dnl[i+1],t,cmp)-lower_bound(sorted+dnl[i]+1,sorted+dnl[i+1],tt,cmp)+1;
tmp=lower_bound(sorted+dnl[i]+1,sorted+dnl[i+1],t,cmp)-sorted-1;
if(sorted[tmp].x!=i || sorted[tmp].y<tt.y || sorted[tmp].y>t.y) c--;
}
return c;
}
# | 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... |