Submission #7560

#TimeUsernameProblemLanguageResultExecution timeMemory
7560gs13068행성 탐사 (GA8_planet)C++98
81.80 / 100
1192 ms1756 KiB
#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<67;i++)my_paint(-i,0); for(i=0;i<67;i++)my_paint(0,-i); } void sangsoo() { calls = 0; int x,y; int l,r,mid; for(x=0;x<2222;x+=calls)if(my_row(x))break; for(l=0,r=calls-1;l<r;my_row(x+mid)?l=mid:r=mid-1)mid=(l+r+1)/2; x+=l; while(calls<67)wait(); for(y=0;y<2222;y+=calls-67)if(my_col(y))break; for(l=0,r=calls-1;l<r;my_col(y+mid)?l=mid:r=mid-1)mid=(l+r+1)/2; y+=l; my_report(x,y); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...