# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
650780 | Matteo_Verz | Zalmoxis (BOI18_zalmoxis) | C++17 | 159 ms | 16432 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>
#ifdef BLAT
#include "debug/debug.hpp"
#else
#define debug(x...)
#endif
using namespace std;
bool removeElements(vector <int> &st) {
bool removed = false;
while (st.size() > 1 && st[st.size() - 1] == st[st.size() - 2]) {
removed = true;
st.pop_back();
st.back()++;
}
return removed;
}
void print(int n, int &k) {
if (n == 0 || k == 0) cout << n << ' ';
else {
k--;
print(n - 1, k);
print(n - 1, k);
}
}
int main() {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |