Submission #7130

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