# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
68589 | aome | Zalmoxis (BOI18_zalmoxis) | C++17 | 256 ms | 7928 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 <bits/stdc++.h>
using namespace std;
vector<int> vres, vcur, vadd;
void add() {
int tmp = vcur.back();
vadd.push_back(vres.size());
vres.push_back(tmp);
++tmp;
vcur.pop_back();
while (vcur.size() && vcur.back() == tmp) {
vcur.pop_back(), tmp++;
}
vcur.push_back(tmp);
}
void cal(int val, int need) {
// assert(need <= 1 << val);
if (need == 1) {
cout << val << ' '; return;
}
int tmp = min(need - 1, (1 << (val - 1)));
cal(val - 1, tmp), cal(val - 1, need - tmp);
}
int main() {
ios::sync_with_stdio(false);
int n, m, x;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |