Submission #7847

# Submission time Handle Problem Language Result Execution time Memory
7847 2014-08-20T00:08:54 Z cki86201 행성 탐사 (GA8_planet) C++
Compilation error
0 ms 0 KB
void ainta(){
	paint(0,0);
	for(int i=2221;i>2121;i--)paint(i,i);
}

void sangsoo(){
	int p = 0, q = 0, cnt = 1;
	while(!count_row(p))p = (p + cnt++) % 2222;
	for(int i=6;i>=0;i--,cnt++)if(count_row((p+(1<<i))%2222))p = (p + (1<<i)) % 2222;
	while(!count_col(q))q += cnt++;
	for(int i=6;i>=0;i--)if(count_col((q+(1<<i))%2222))q = (q + (1<<i)) % 2222;
	report(p, q);
}

Compilation message

planet.cpp: In function 'void ainta()':
planet.cpp:2:11: error: 'paint' was not declared in this scope
planet.cpp: In function 'void sangsoo()':
planet.cpp:8:20: error: 'count_row' was not declared in this scope
planet.cpp:9:57: error: 'count_row' was not declared in this scope
planet.cpp:10:20: error: 'count_col' was not declared in this scope
planet.cpp:11:51: error: 'count_col' was not declared in this scope
planet.cpp:12:13: error: 'report' was not declared in this scope
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]