# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
42117 | didwlvv | cmp (balkan11_cmp) | C++14 | 1948 ms | 94456 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "cmp.h"
void remember(int n) {
int x = n / 480;
bit_set(1000 + x);
n %= 480;
x = n / 48;
bit_set(2000 + x);
n %= 48;
x = n / 6;
bit_set(3000 + x);
n %= 6;
x = n;
bit_set(4000 + x);
}
int compare(int b) {
if (!bit_get(1000 + b / 480)) {
int x = b / 480;
if (x <= 5) {
for (int i = 0; i < x; i++)if (bit_get(1000 + i))return 1;
return -1;
}
else {
for (int i = 11; i > x; i--)if (bit_get(1000 + i))return -1;
return 1;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |