Submission #854027

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

Compilation message

Main.cpp:2:9: error: expected unqualified-id before 'while'
    2 |         while((i == 0 || dp[i].count(0) == 0) && dp[i].size() != 0) {
      |         ^~~~~