Submission #7134

#TimeUsernameProblemLanguageResultExecution timeMemory
7134ainta행성 탐사 (GA8_planet)C++98
96.20 / 100
716 ms1756 KiB
#include "planet.h" #define N 2222 void ainta() { int i; for (i = 0; i <= 100; i++){ paint(i, i); } } void sangsoo() { int i, x, y, B, E, M, R, a, b, cnt = 0, S = 0; for (i = 0;; i++){ S += cnt; if (count_row(S % 2222))break; cnt++; } R = S % 2222; E = R - 1, B = R - cnt - 1; if (B < 0)E += 2222, B += 2222; while (B <= E){ M = (B + E) >> 1; if (count_row(M % 2222)){ R = M; E = M - 1; } else B = M + 1; cnt++; } x = R % 2222; S = 0; for (i = 0;; i++){ S += cnt; if (count_col(S % 2222))break; cnt++; } b = i; R = S; E = R - 1, B = R - cnt - 1; if (B < R - 100)B = R - 100; if (B < 0)E += 2222, B += 2222; while (B <= E){ M = (B + E) >> 1; if (count_col(M % 2222)){ R = M; E = M - 1; } else B = M + 1; } y = R % 2222; report(x, y); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...