Submission #43891

#TimeUsernameProblemLanguageResultExecution timeMemory
43891dhkim0225cmp (balkan11_cmp)C++14
0 / 100
2 ms248 KiB
#include "cmp.h"

void remember(int n) {
	bit_set(n);
}

int compare(int b) {
	for (int i = 1; i < 4095; i++) {
		if (bit_get(i) == 1) {
			if (b < i)
				return -1;
			else if (b == i)
				return 0;
			else
				return 1;
		}
	}
}

Compilation message (stderr)

cmp.cpp: In function 'int compare(int)':
cmp.cpp:18:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Result Execution timeMemoryGrader output
Fetching results...