# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
854027 | Lobo | Weird Numeral System (CCO21_day1problem2) | C++17 | 0 ms | 0 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.
int i = 0;
while((i == 0 || dp[i].count(0) == 0) && dp[i].size() != 0) {
for(auto X : dp[i]) {
int nn = X.fr;
for(auto x : a) {
if((x%k+k)%k == (nn%k+k)%k) {
dp[i+1][(nn-x)/k] = x;
}
}
}
i++;
}