Submission #448621

# Submission time Handle Problem Language Result Execution time Memory
448621 2021-07-31T08:12:30 Z vanic Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
0 / 100
2371 ms 24020 KB
int encode (int n, int x, int y) {
	int a=0;
	for(int i=0; i<12; i++){
		if(((1<<i)&x) && !((1<<i)&y)){
			a=i+1;
		}
	}
	if(a){
		return a;
	}
	for(int i=0; i<12; i++){
		if(!((1<<i)&x) && ((1<<i)&y)){
			a=10+i;
		}
	}
	return a;
}
int decode (int n, int q, int h) {
	if(h>9){
		h-=10;
		if((1<<h)&q){
			return 0;
		}
		return 1;
	}
	else{
		h--;
		if((1<<h)&q){
			return 1;
		}
		return 0;
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 2192 ms 24020 KB wrong answer
2 Incorrect 2371 ms 24004 KB wrong answer