# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
43943 | ik_e | cmp (balkan11_cmp) | C++17 | 2094 ms | 96772 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"
int sec[4] = { 409, 51,8,2 };
int ch[4][2] = {
4,4,
7,6,
3,2,
4,3
};
int p[4], ofs[4] = { 4096, 4106, 4186, 4666 };
bool big;
int index(int lev, int rm) {
int div = 10 - 2 * lev;
for (int i = 0; i < div; ++i) {
if (i < ch[lev][big]) {
if (rm >= sec[lev]) rm -= sec[lev];
else {
big = 0;
p[lev] = i;
break;
}
}
else {
if (rm >= sec[lev] + 1) rm -= (sec[lev] + 1);
else {
big = 1;
p[lev] = i;
break;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |