Submission #36406

#TimeUsernameProblemLanguageResultExecution timeMemory
36406mohammad_kilaniQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++14
27 / 100
1788 ms27472 KiB
#include <bits/stdc++.h>
using namespace std;

int encode (int n, int x, int y) {
	int cur = 0 ;
	for(int i=0;i<20;i++){
		if(((x >> i) & 1) != ((y >> i) & 1)){
			cur = i;
			if(((x >> i) & 1) == 1)
				cur += 10;
			break;
		}
	}
  return cur + 1;
}
#include <bits/stdc++.h>
using namespace std;

int decode (int n, int q, int h) {
	h--;
	bool bit = 0;
	if(h >= 10) bit = 1, h -= 10;
	return (((q >> h) & 1) == bit);
}
#Verdict Execution timeMemoryGrader output
Fetching results...