# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1141761 | ibsha | 비교 (balkan11_cmp) | C++20 | 414 ms | 82512 KiB |
#include "cmp.h"
void remember(int a) {
a -= 2048;
if (a < 0) {
bit_set(1);
}
for (int i=2; i<=9; i++){
if (a & (1<<(i-2))) bit_set(i);
}
}
int compare(int b) {
int a=0;
for (int i=2; i<=9; i++){
if (bit_get(i)) a |= (1<<(i-2));
}
if (bit_get(1)) a|=(-1<<8);
a += 2048;
if (b < a) return -1;
else if (b == a) return 0;
return 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |