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"
int calls = 0;
int my_row(int r)
{
calls++;
return count_row(r);
}
int my_col(int c)
{
calls++;
return count_col(c);
}
void wait()
{
calls++;
count_row(0);
}
void ainta()
{
int i;
for(i=0;i<1111;i++)paint((2222-i)%2222,0);
for(i=0;i<1111;i++)paint(0,(2222-i)%2222);
}
void sangsoo()
{
calls = 0;
int x,y;
for(x=0;x<1111;x++)if(my_row(x))break;
while(calls<1111)wait();
for(y=0;y<1111;y++)if(my_col(y))break;
x=x*2-1;
y=y*2-1;
if(x<0)x=0;
if(y<0)y=0;
if(my_row(x)==1)x++;
if(my_col(y)==1)y++;
report(x,y);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |