Submission #43902

# Submission time Handle Problem Language Result Execution time Memory
43902 2018-03-27T11:09:35 Z dhkim0225 cmp (balkan11_cmp) C++14
0 / 100
2 ms 248 KB
#include "cmp.h"

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

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

# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB ZERO POINTS: bit_set with addr out of range 0