이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
for (i = 0;; i++){
cnt++;
if (count_row(i * 50 % 2222))break;
}
a = i;
for (i = 0;; i++){
cnt++;
if (count_col(i * 100 % 2222))break;
}
b = i;
R = a * 50; E = R - 1, B = R - a - 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;
}
x = R % 2222;
R = b * 100; E = R - 1, B = R - a - b - 1;
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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |