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