# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
413326 | sebinkim | Weird Numeral System (CCO21_day1problem2) | C++17 | 15 ms | 24012 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;
using ll = long long;
map<ll, ll> M;
queue<ll> Q;
vector<ll> A[1010101];
ll k, q, d, m;
void tc(ll n) {
ll t, u;
M.clear();
for (; !Q.empty(); Q.pop());
if (n) Q.push(n);
else {
for (ll &a: A[0]) {
u = -a / k;
M[u] = 0; Q.push(u);
}
}
for (; !Q.empty(); ) {
t = Q.front(); Q.pop();
if (t == 0) {
for (; t != n; t = M[t]) {
cout << (M[t] - t * k) << " ";
}
cout << "\n";
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |