Submission #44552

# Submission time Handle Problem Language Result Execution time Memory
44552 2018-04-03T05:37:18 Z wzy Question (Grader is different from the original contest) (CEOI14_question_grader) C++11
Compilation error
0 ms 0 KB
int encode (int n, int x, int y) {
 	for(int j = 0 ; j <= 10 ; i++){
			if((x & 1<<j) && !(y & 1<<j)){
				return j + 1;
			}
		}
}
int decode (int n, int q, int h) {
	h--;
	if(q & 1<<h){
		return 1;
	}
	return 0;
}

Compilation message

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:2:29: error: 'i' was not declared in this scope
   for(int j = 0 ; j <= 10 ; i++){
                             ^
encoder.cpp:7:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^