# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
854027 | 2023-09-25T21:09:11 Z | Lobo | Weird Numeral System (CCO21_day1problem2) | C++17 | 0 ms | 0 KB |
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++; }