Submission #7205

# Submission time Handle Problem Language Result Execution time Memory
7205 2014-07-28T06:47:41 Z ainta 행성 탐사 (GA8_planet) C++
Compilation error
0 ms 0 KB
#include "grid.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, S = 0;
	for (i = 0;; i++){
		cnt++;
		S = S + cnt;
		if (S >= 2221)break;
		if (count_row(S))break;
	}
	R = S % 2222; E = R - 1, B = R - cnt - 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;
		cnt++;
	}
	x = R % 2222;
	S = 0;
	for (i = 0;; i++){
		cnt++;
		S = S + cnt;
		if (S >= 2221)break;
		if (count_col(S))break;
	}
	b = i;
	R = S; E = R - 1, B = R - cnt - 1;
	if (B < R - 100)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);
}

Compilation message

planet.cpp:1:18: fatal error: grid.h: No such file or directory
compilation terminated.
grader.c: In function 'void count_increment(const char*)':
grader.c:74:103: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat]
grader.c:74:103: warning: format '%d' expects argument of type 'int', but argument 3 has type 'const char*' [-Wformat]
grader.c: In function 'int main()':
grader.c:146:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]