Submission #260228

#TimeUsernameProblemLanguageResultExecution timeMemory
260228islingr질문 (CEOI14_question_grader)C++17
0 / 100
7076 ms3416 KiB
int encode(int n, int x, int y) {
	int h[924];
	for (int S = 0, c = 0; c != 924; ++S)
		if (__builtin_popcount(S) == 6)
			h[c++] = S;
	x = h[x]; y = h[y];
	for (int i = 0; i < 12; ++i)
		if ((x & 1 << i) && (~y & 1 << i))
			return i + 1;
}
int decode(int n, int q, int k) {
	int h[924];
	for (int S = 0, c = 0; c != 924; ++S)
		if (__builtin_popcount(S) == 6)
			h[c++] = S;
	return h[q] >> --k & 1;
}

Compilation message (stderr)

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:10:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...