This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 = -1, b = -1, cnt = 0;
for (i = 0;; i++){
cnt++;
if (a == -1 && count_row(i * 80 % 2222)){
a = i;
}
if (b == -1 && count_col(i * 80 % 2222)){
b = i;
}
if (a != -1 && b != -1)break;
}
R = a * 80; E = R - 1, B = R - 100;
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 * 80, E = R - 1, 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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |