Language: C++

using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vc = vector<char>;
using vvc = vector<vc>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
const ll INF = 1LL << 60;
const ll MOD = 1e9 + 7;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define debug(x) cerr << #x << ": " << x << endl;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}

int main() {
    ll N; cin >> N;
    vll a(N+1);
    rep(i, N) cin >> a[i+1];
    vll ans(N+1, 0);
    ll cnt = 0;
    for(ll i = N; i >= 1; i--) {
        ll sum = 0;
        for(ll k = N/i; k > 1; k--) sum += ans[i * k];

        if(sum % 2 == a[i]) ans[i] = 0;
        else ans[i] = 1, cnt++;
    }

    if(cnt == 0) {
        cout << 0 << endl;
        return 0;
    }

    cout << cnt << endl;
    rep(i, N) if(a[i+1] == 1) cout << i+1 << " ";
    cout << endl;
}


Compiler output:
a.cc:3:13: error: 'vector' does not name a type
    3 | using vll = vector<ll>;
      |             ^~~~~~
a.cc:4:14: error: 'vector' does not name a type
    4 | using vvll = vector<vll>;
      |              ^~~~~~
a.cc:5:12: error: 'vector' does not name a type
    5 | using vc = vector<char>;
      |            ^~~~~~
a.cc:6:13: error: 'vector' does not name a type
    6 | using vvc = vector<vc>;
      |             ^~~~~~
a.cc:7:13: error: 'pair' does not name a type
    7 | using pll = pair<ll, ll>;
      |             ^~~~
a.cc:8:14: error: 'vector' does not name a type
    8 | using vpll = vector<pll>;
      |              ^~~~~~
a.cc: In function 'int main()':
a.cc:17:11: error: 'cin' was not declared in this scope
   17 |     ll N; cin >> N;
      |           ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:18:5: error: 'vll' was not declared in this scope; did you mean 'll'?
   18 |     vll a(N+1);
      |     ^~~
      |     ll
a.cc:19:22: error: 'a' was not declared in this scope
   19 |     rep(i, N) cin >> a[i+1];
      |                      ^
a.cc:20:8: error: expected ';' before 'ans'
   20 |     vll ans(N+1, 0);
      |        ^~~~
      |        ;
a.cc:24:44: error: 'ans' was not declared in this scope
   24 |         for(ll k = N/i; k > 1; k--) sum += ans[i * k];
      |                                            ^~~
a.cc:26:23: error: 'a' was not declared in this scope
   26 |         if(sum % 2 == a[i]) ans[i] = 0;
      |                       ^
a.cc:26:29: error: 'ans' was not declared in this scope
   26 |         if(sum % 2 == a[i]) ans[i] = 0;
      |                             ^~~
a.cc:27:14: error: 'ans' was not declared in this scope
   27 |         else ans[i] = 1, cnt++;
      |              ^~~
a.cc:31:9: error: 'cout' was not declared in this scope
   31 |         cout << 0 << endl;
      |         ^~~~
a.cc:31:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:22: error: 'endl' was not declared in this scope
   31 |         cout << 0 << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:35:5: error: 'cout' was not declared in this scope
   35 |     cout << cnt << endl;
      |     ^~~~
a.cc:35:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:20: error: 'endl' was not declared in this scope
   35 |     cout << cnt << endl;
      |                    ^~~~
a.cc:35:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:36:18: error: 'a' was not declared in this scope
   36 |     rep(i, N) if(a[i+1] == 1) cout << i+1 << " ";
      |                  ^