# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1246964 | MateiKing80 | cmp (balkan11_cmp) | C++20 | 0 ms | 0 KiB |
#include <bits/stc++.h>
void remember(int a) {
for (int i = 0; i < 12; i ++)
if (a & (1 << i))
bit_set(i);
}
int compare(int b) {
for (int i = 11; i >= 0; i --) {
int x = bit_get(i);
int y = (b & (1 << i)) > 0;
if (x == y)
continue;
if (x > y)
return -1;
return 1;
}
return 0;
}