Submission #7181

#TimeUsernameProblemLanguageResultExecution timeMemory
7181gs13068행성 탐사 (GA8_planet)C++98
0 / 100
0 ms1756 KiB
#include "planet.h" #define BUCKET 64 void ainta() { int i,j; for(i=0;i<BUCKET;i++)paint(i,0); for(j=1;j<BUCKET;j++)paint(0,j); } void sangsoo() { int x,y,z=0; int i,j,k; for(i=0;i<BUCKET;i++)count_row(0); for(i=0;!(k=count_row(i%2222));i+=BUCKET)z++; i+=2222; j=i-BUCKET+1; while(j<i) { k=(i+j)/2; if(count_row(k%2222))i=k; else j=i+1; } x=j; while(z++<BUCKET)count_col(0); for(i=0;!(k=count_col(i%2222));i+=BUCKET); i+=2222; j=i-BUCKET+1; while(j<i) { k=(i+j)/2; if(count_col(k%2222))i=k; else j=i+1; } y=j; report(x%2222,y%2222); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...