Language: C++

        //#include <bits/stdc++.h>
        #include<iostream>
        #include<algorithm>
        #include<set>
        #include<map>
        #include<math.h>
        //#include <ttmath.h>
        #define endl '\n'
        #define modulo 1000000007
        #define int long long
        #pragma GCC optimize("-Ofast")
        #define float double
        #define PI 3.141592653589793238462643
        #define sinDegrees(x) sin((x) * PI / 180.0)
        #define tanDegrees(x) tan((x) * PI / 180.0)
        #define atanDegrees(x) atan(x)* 180.0 / PI
        using namespace std;
        int power(int x,int y)
        {
        int temp;
        if(y == 0)
        return 1;
        temp = (power(x, y/2))%modulo;
        if (y%2 == 0)
        return ((temp%modulo)*temp)%modulo;
        else
        return ((x*temp%modulo)*temp)%modulo;
        }
        int inv(int x)
        {
        return (power(x,modulo-2)+modulo)%modulo;
        }
        /*#include "testlib.h"
        int main(int argc, char* argv[])
        {
        iostream::sync_with_stdio(0);
        cin.tie(0);
        cout.tie(0);
        registerGen(argc, argv, 1);
        int n,k;
        n=rnd.next(1,50);
        k=rnd.next(1,n);
        cout<<n<<' '<<k;
        }*/
        bool comp(pair<int,int>a,pair<int,int> b)
        {
            return a.second>b.second;
        }
        int32_t main()
        {
            //freopen("output.txt","w", stdout);
            //freopen("input4.txt","r", stdin);
            iostream::sync_with_stdio(0);
            cin.tie(0);
            cout.tie(0);
            int n;
            cin>>n;
            int arr[n];
            int arr2[100001]={0};
            vector<int>lolz;
            for(int i=0;i<n;i++){
            cin>>arr[i];
            }
            for(int i=0;i<n;i++){
            if(arr[i]==1)
            lolz.push_back(i+1);
            }
            for(int i=0;i<n;i++){
            int temp=i+1;
            if(arr[i])
            for(int l=1;l*l<=temp;l++){
            if(temp%l==0){
            arr2[temp/l]++;
            if(temp/(temp/l)!=temp/l)
            arr2[temp/(temp/l)]++;
            }
            }
            }
            vector<int>answer;
            for(int i=1;i<=n;i++){
            if(!(arr2[i]%2==arr[i-1])){
            goto a;
            }
            if(arr[i-1])
            answer.push_back(i);
            }
            cout<<answer.size()<<endl;
            for(int i=0;i<answer.size();i++){
            cout<<answer[i]<<' ';
            }
            return 0;
            a:;
            cout<<-1;
            return 0;
        }


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:60:13: error: 'vector' was not declared in this scope
   60 |             vector<int>lolz;
      |             ^~~~~~
a.cc:7:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    6 |         #include<math.h>
  +++ |+#include <vector>
    7 |         //#include <ttmath.h>
a.cc:10:21: error: expected primary-expression before 'long'
   10 |         #define int long long
      |                     ^~~~
a.cc:60:20: note: in expansion of macro 'int'
   60 |             vector<int>lolz;
      |                    ^~~
a.cc:66:13: error: 'lolz' was not declared in this scope
   66 |             lolz.push_back(i+1);
      |             ^~~~
a.cc:10:21: error: expected primary-expression before 'long'
   10 |         #define int long long
      |                     ^~~~
a.cc:79:20: note: in expansion of macro 'int'
   79 |             vector<int>answer;
      |                    ^~~
a.cc:85:13: error: 'answer' was not declared in this scope
   85 |             answer.push_back(i);
      |             ^~~~~~
a.cc:87:19: error: 'answer' was not declared in this scope
   87 |             cout<<answer.size()<<endl;
      |                   ^~~~~~