Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define PI 3.14159265359
typedef long long ll;
using namespace std;

const int mod = 1000000007;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const {
    return pow(mod-2);
  }
  mint& operator/=(const mint a) {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const {
    mint res(*this);
    return res/=a;
  }
};

mint po(mint a,int b){
    mint ans=1;
    rep(i,b){
        ans*=a;
    }
    return ans;
}

int main(){
int n; cin >> n;
mint ad=0; int jou=0;
int f=1; int s=1;
vector<vector<ll>> a(n,vector<ll>(61));
vector<ll> len(n);
  rep(i,n){
    ll p; ll lee=0;
    cin >> p;
    int g=0;
    rep(g,61)
    if(p%2) a[i][g]=1;
    else a[i][g]=0;
    p/=2;
    }
  }

vector<ll> zero(61,0); vector<ll> one(61,0);
rep(j,61){
    rep(i,n){
        if(a[j][i]==1) one[j]++;
        else zero[j]++;
    }
}

int y=0;
/*rep(i,n){
        while(ju){
     	   if(a[i][y]==0){
            ad+=po(2,y)*one[y];
            }
            else{
            ad+=po(2,y)*zero[y];
            }
        }
        y++;
        ju--;
        }
      y=0;
    }
}*/
rep(i,61){
    ad+=zero[i]*one[i];
}
cout << ad.x/2 << endl;
return 0;
}


Compiler output:
a.cc:2:18: error: expected unqualified-id before 'for'
    2 | #define rep(i,n) for(int i=0; i<n; i++)
      |                  ^~~
a.cc:82:1: note: in expansion of macro 'rep'
   82 | rep(j,61){
      | ^~~
a.cc:82:5: error: 'j' does not name a type
   82 | rep(j,61){
      |     ^
a.cc:2:31: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0; i<n; i++)
      |                               ^
a.cc:82:5: error: 'j' does not name a type
   82 | rep(j,61){
      |     ^
a.cc:2:36: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0; i<n; i++)
      |                                    ^
a.cc:2:18: error: expected unqualified-id before 'for'
    2 | #define rep(i,n) for(int i=0; i<n; i++)
      |                  ^~~
a.cc:105:1: note: in expansion of macro 'rep'
  105 | rep(i,61){
      | ^~~
a.cc:105:5: error: 'i' does not name a type
  105 | rep(i,61){
      |     ^
a.cc:2:31: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0; i<n; i++)
      |                               ^
a.cc:105:5: error: 'i' does not name a type
  105 | rep(i,61){
      |     ^
a.cc:2:36: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0; i<n; i++)
      |                                    ^
a.cc:108:1: error: 'cout' does not name a type
  108 | cout << ad.x/2 << endl;
      | ^~~~
a.cc:109:1: error: expected unqualified-id before 'return'
  109 | return 0;
      | ^~~~~~
a.cc:110:1: error: expected declaration before '}' token
  110 | }
      | ^