Submission #7110

#TimeUsernameProblemLanguageResultExecution timeMemory
7110ainta행성 탐사 (GA8_planet)C++98
79.30 / 100
496 ms1756 KiB
#include "planet.h"

#define N 2222

void ainta() {
	int i;
	for (i = 0; i <= 47; 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 * 48) % 2222))break;
	}
	a = i;
	for (i = 0;; i++){
		cnt++;
		if (count_col((i * 48) % 2222))break;
	}
	b = i;
	while (cnt < 48){
		count_row(1);
		cnt++;
	}
	R = a * 48; B = R + 1, E = R + 47;
	while (B <= E){
		M = (B + E) >> 1;
		if (count_row(M % 2222)){R = M; B = M + 1;}
		else E = M - 1;
	}
	x = (R + 2222 - 47)%2222;
	R = b * 48; B = R + 1, E = R + 47;
	while (B <= E){
		M = (B + E) >> 1;
		if (count_col(M % 2222)){ R = M; B = M + 1; }
		else E = M - 1;
	}
	y = (R + 2222 - 47) % 2222;

	report(x, y);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...