답안 #7114

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
7114 2014-07-26T08:55:13 Z ainta 행성 탐사 (GA8_planet) C++
0 / 100
0 ms 1756 KB
#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 * 80 % 2222))break;
	}
	b = i;
	R = a * 50; E = R - 1, B = R - a;
	if (B < 0 || E < 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 - a - b;
	if (B < 0 || E < 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);
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1756 KB Output isn't correct - 답이 틀려서 프로그램을 종료합니다.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Halted 0 ms 0 KB -