Language: C++

Vint A, B;
Vbool Done;
int n;

int solve(int k){
    if(Done[k]) return B[k];
    for(int x = 2 * k; x <= n; x += k) B[k] += solve(x);
    Done[k] = false;
    return B[k] %= 2;
}

int main(void){
    scanf("%d", &n);
    A.resize(n+1); REP(i, n) scanf("%d", &A[i+1]);
    Done.resize(n+1, true);
    B = A;
    solve(1);
    std::queue<int> Q; REP(i, n) if(B[i+1] == 1){Q.push(i+1);}
    printf("%lu\n", Q.size());
    while(not Q.empty()){
        printf("%d", Q.front()); Q.pop();
        putchar(Q.empty() ? '\n' : ' ');
    }
    return 0;
}

Compiler output:
a.cc:1:1: error: 'Vint' does not name a type; did you mean 'int'?
    1 | Vint A, B;
      | ^~~~
      | int
a.cc:2:1: error: 'Vbool' does not name a type; did you mean 'bool'?
    2 | Vbool Done;
      | ^~~~~
      | bool
a.cc: In function 'int solve(int)':
a.cc:6:8: error: 'Done' was not declared in this scope
    6 |     if(Done[k]) return B[k];
      |        ^~~~
a.cc:6:24: error: 'B' was not declared in this scope
    6 |     if(Done[k]) return B[k];
      |                        ^
a.cc:7:40: error: 'B' was not declared in this scope
    7 |     for(int x = 2 * k; x <= n; x += k) B[k] += solve(x);
      |                                        ^
a.cc:8:5: error: 'Done' was not declared in this scope
    8 |     Done[k] = false;
      |     ^~~~
a.cc:9:12: error: 'B' was not declared in this scope
    9 |     return B[k] %= 2;
      |            ^
a.cc: In function 'int main()':
a.cc:13:5: error: 'scanf' was not declared in this scope
   13 |     scanf("%d", &n);
      |     ^~~~~
a.cc:14:5: error: 'A' was not declared in this scope
   14 |     A.resize(n+1); REP(i, n) scanf("%d", &A[i+1]);
      |     ^
a.cc:14:24: error: 'i' was not declared in this scope
   14 |     A.resize(n+1); REP(i, n) scanf("%d", &A[i+1]);
      |                        ^
a.cc:14:20: error: 'REP' was not declared in this scope
   14 |     A.resize(n+1); REP(i, n) scanf("%d", &A[i+1]);
      |                    ^~~
a.cc:15:5: error: 'Done' was not declared in this scope
   15 |     Done.resize(n+1, true);
      |     ^~~~
a.cc:16:5: error: 'B' was not declared in this scope
   16 |     B = A;
      |     ^
a.cc:18:10: error: 'queue' is not a member of 'std'
   18 |     std::queue<int> Q; REP(i, n) if(B[i+1] == 1){Q.push(i+1);}
      |          ^~~~~
a.cc:1:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
  +++ |+#include <queue>
    1 | Vint A, B;
a.cc:18:16: error: expected primary-expression before 'int'
   18 |     std::queue<int> Q; REP(i, n) if(B[i+1] == 1){Q.push(i+1);}
      |                ^~~
a.cc:19:21: error: 'Q' was not declared in this scope
   19 |     printf("%lu\n", Q.size());
      |                     ^
a.cc:19:5: error: 'printf' was not declared in this scope
   19 |     printf("%lu\n", Q.size());
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | Vint A, B;
a.cc:22:9: error: 'putchar' was not declared in this scope; did you mean 'char'?
   22 |         putchar(Q.empty() ? '\n' : ' ');
      |         ^~~~~~~
      |         char