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 "planet.h"
#include <cstdio>
#include <cstdlib>
void ainta()
{
int i,j;
paint(0,0);
for(i=1;i<98;i++)paint(2222-i,2222-i);
paint(1,0);
paint(2,0);
paint(3,2221);
paint(4,0);
paint(5,2221);
paint(6,2220);
}
void sangsoo()
{
int x,y,z=0;
int i,j,k,t=0;
for(x=0;;x+=z)
{
if(x+z>=2221)
{
i=x+z;
break;
}
z++;
if(count_row(x))
{
i=x+z-1;
break;
}
}
if(i>2221)i=2221;
while(x<i)
{
k=(x+i+1)/2;
z++;
if(count_row(k))x=k;
else i=k-1;
}
for(y=0;;y+=z)
{
if(y+z>=2221)
{
j=y+z;
break;
}
z++;
if(count_col(y))
{
j=y+z-1;
break;
}
}
if(j>2221)j=2221;
while(y<j&&z<103)
{
k=(y+j+1)/2;
z++;
if(count_col(k))y=k;
else j=k-1;
}
z++;
t=count_col((y+1)%2222);
if(t>0)y++;
if(t==2&&z>=101)y++;
if(t==3&&z>=103)y++;
if(t==2&&z>=104)y++;
report(x,y);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |