criyle/codenet-compile-errors huggingface dataset:
Language: C++

#pragma GCC optimize("O3")
#include<bits/stdc++.h>
#define ll long long int 
using namespace std;
int const MAXN=300100, MOD=1e9+7;
int suff[MAXN][62], scomp[MAXN][62];
ll ans=0;
ll rd()
{
    ll res = 0;
    char ch = 0;
    while(ch < '0') ch = getchar_unlocked();
    for(; ch >= '0'; ch = getchar_unlocked()) res = res * 10 + ch - '0';
    return res;
}

void wr(ll v)
{
    char buf[28];
    int p = 0;
    if(v == 0) buf[p++] = 0;
    for(; v; v /= 10) buf[p++] = v % 10;
    while(p--) putchar_unlocked(buf[p] + '0');
}
void my_pow(int base, int esp, int times){
	if(times==0)
		return;
	int val=power(2,esp,1e9+7);
	ans=(ans+(val*times)%MOD)%MOD;
}
int main(){
	cin.tie(0),cin.sync_with_stdio(0),cout.tie(0),cout.sync_with_stdio(0);
	int n;
	n=rd();
	vector<ll> v(n);
	for(int i=0;i<n;i++)
		v[i]=rd();
	for(int i=0;i<n;i++){
		ll esp=1, p=0;
		while(esp<=v[i]){
			esp*=2;
			p++;
		}
		ll copy=v[i];
		while(copy){
			if(copy>=esp){
				copy-=esp;
				scomp[i][p]=1;
			}
			esp/=2;
			p--;
		}
	}
	for(int i=n-1;i>=0;i--){
		for(int j=0;j<62;j++)
			suff[i][j]=suff[i+1][j]+scomp[i][j];
	}
	for(int i=0;i<n;i++)
		for(int j=0;j<60;j++){
			if(scomp[i][j]){
				int times=n-i-suff[i][j];
				my_pow(2,j,times);
			}
			else{
				int times=suff[i][j];
				my_pow(2,j,times);
			}
		}
	wr(ans);
}

Compiler output:
a.cc: In function 'void my_pow(int, int, int)':
a.cc:28:17: error: 'power' was not declared in this scope
   28 |         int val=power(2,esp,1e9+7);
      |                 ^~~~~
Language: Java

def factorial( n) : 
    M = 1000000007
    f = 1
  
    for i in range(1, n + 1):  
        f = (f * i) % M
    return f  

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
def factorial( n) : 
^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: <identifier> expected
def factorial( n) : 
                ^
Main.java:1: error: ';' expected
def factorial( n) : 
                 ^
3 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);
  
  auto lshift = [](int n) {
    size_t t = 1;
    for (int i = 0; i < n; i++) {
      t <<= 1;
      t %= MOD;
    }
    return t;
  };

  size_t N; cin>>N;
  vector<size_t> A(N); for (auto& a : A) cin>>a;
  size_t ans = 0;
  constexpr size_t MOD = 1e9+7;
  for (size_t i = 0; i < 60; i++) {
    size_t cnt1 = 0;
    for (auto a : A) {
      if (a & (1ul << i))
        cnt1++;
    }
    size_t sum = cnt1 * (N - cnt1);
    ans += (sum * (lshift(i))) % MOD;
    ans %= MOD;
  }
  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In lambda function:
a.cc:12:12: error: 'MOD' was not declared in this scope
   12 |       t %= MOD;
      |            ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  vector<long long>A(N);
  for(int i=0;i<N;i++) cin>>A[i];
  vector<vector<int>>data(N,vector<int>(60));
  for(int i=0;i<N;i++){
    for(int j=0;j<60;j++){
      if(A[i]%2==1) data[i][j]=1;
      A[i]/=2;
    }
  }
  vector<long long>data1(60);
  for(int i=0;i<60;i++){
    for(int j=0;j<N;j++){
      if(data[j][i]==1) data1[i]++;
    }
  }
  long long ans=0;
  for(int i=0;i<60;i++){
    long long x=data1[i]%1000000007;
    long long y=(N-data1[i])%1000000007;
    long long z=pow(2,i)%1000000007;
    long long p=(x*y)%1000000007;
    ans+=(p*z)%1000000007;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:25: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   26 |     long long z=pow(2,i)%1000000007;
      |                 ~~~~~~~~^~~~~~~~~~~
      |                    |     |
      |                    |     int
      |                    __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <iostream>
#include <string>
#define REP(i,n) for(int i=0;i<(n);++i)
#define MOD 1000000007
using namespace std;
typedef long long int LL;


int main(){
  int N;
  cin >> N;
  int k[63] = {};
  REP(i, N){
    LL A;
    cin >> A;
    for(int i = 0;A != 0; ++i) {
      if((A & 1) != 0) { k[i]++; }
      A = A >> 1;
    }
  }
  LL ret = 0;
  REP(i, 63) {
    LL m = (1LL << i) % MOD;
    LL c = k[i] * (N - k[i]) % MOD
    ret += m * c;
    ret = ret % MOD;
  }
  cout << ret << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: expected ',' or ';' before 'ret'
   25 |     ret += m * c;
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  int* a = new int[n];
  for(int i=0;i<n;i++) cin>>a[i];
  int sum=0;
  for(int i=0;i<n-1;i++){
  	for(int j=i+1;j<n;j++)
      int ans = ((a[i]|a[j])&(~a[i]|~a[j]))%1000000007;
    	sum = sum+ans;
  }
  cout<<sum%1000000007<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |         sum = sum+ans;
      |                   ^~~
      |                   abs
Language: C++

#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

using namespace std;
using ll = long long;

constexpr ll infl = 1000000000000000007LL;
constexpr int inf = 1000000007;

int main() {
    constexpr ll mod = inf;
    int n; cin >> n;
    vector<ll> a(n);
    vector<vector<ll>> cnt(n, vector<ll>(63));
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
        for (int j = 0; j < 63; ++j) {
            cnt[i][j] += a[i] >> j & 1;
        }
    }

    for (int j = 0; j < 63; ++j) {
        for (int i = n - 2; i >= 0; --i) {
            cnt[i][j] += cnt[i + 1][j];
        }
    }

    ll ans = 0;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < 63; ++j) {
            if (cnt[i][j] == 0) continue;

            if (a[i] >> j & 1) {
                ans += (1LL << j) % mod * (n - i - cnt[i][j]);
            }
            else {
                ans += (1LL << j) % mod * (cnt[i][j]);
            }
            ans %= mod;
        }
    }

    // ll ans2 = 0;
    // for (int i = 0; i < n; ++i) {
    //     for (int j = i + 1; j < n; ++j) {
    //         ans2 += a[i] ^ a[j];
    //         ans2 %= mod;
    //     }
    // }

    cout << ans << " " << ans2 <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:27: error: 'ans2' was not declared in this scope; did you mean 'ans'?
   63 |     cout << ans << " " << ans2 <<endl;
      |                           ^~~~
      |                           ans
Language: C++

#include<bits/stdc++.h>
using nmespace std;
int main(){
  int n;
  cin>>n;
  int* a = new int[n];
  for(int i=0;i<n;i++) cin>>a[i];
  int i=1,sum=0;
  for(int j=i+1;j<=n;j++){
    sum = sum+(a[i]^a[j]);
    i++;
  }
  cout<<sum%1000000007<<endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nmespace'
    2 | using nmespace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout<<sum%1000000007<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |   cout<<sum%1000000007<<endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<string.h>
#include<math.h>
using namespace std;
long long a[300000+10];
int main()
{

    long long sum=0;
    long long n,h;
    cin>>n;
    for(int i=0; i<n; i++)
    {
        cin>>h;
        a[i]=h;
    }
    for(int i=0; i<n-1; i++)
        for(int j=i+1; j<n; j++)
            sum+=(a[i]^a[j])%(1000000000+7);
    cout<<sum%(1000000000+7);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope
   10 |     cin>>n;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<math.h>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout<<sum%(1000000000+7);
      |     ^~~~
a.cc:19:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

// amigos y no más
// dile a la jardinera que traigo flores
 
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include<bits/stdc++.h>
 
#define fastio ios_base::sync_with_stdio(0);cin.tie(0)
#define MOD 998244353LL
#define MOD1 1000000007LL
#define LIM 262150
 
using namespace std;
 
typedef long long ll ;
 
int n;
int bits1[100] = {0};

int cont=0;
ll ans = 0LL;

int main() {
	fastio;
	cin>>n;
	for(int i=0; i<n;i++){
		ll x; cin>>x;
		cont=0;
		while(x){
			ll y = x&1LL;
			if(y == 1LL )(bits[cont])++;
			x = x>>1;
			cont++;
		}
	}
	
	for(int i=0; i<64;i++){
		int bits0 = n - bits[i] ; 
		ans = (ans + ( ( ((bits0 * bits[i])%MOD1)  * ( (1LL<<i) %MOD1)  ) % MOD1 ) )% MOD1;
	}
	
	cout<<ans<<"\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:39: error: 'bits' was not declared in this scope; did you mean 'bits1'?
   32 |                         if(y == 1LL )(bits[cont])++;
      |                                       ^~~~
      |                                       bits1
a.cc:39:33: error: 'bits' was not declared in this scope; did you mean 'bits0'?
   39 |                 int bits0 = n - bits[i] ;
      |                                 ^~~~
      |                                 bits0
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  #define int long long;
  int n,b=0;;
  cin>>n;
  int a[n+1];
  for(int i=1;i<=n;i++){
    cin>>a[i];
  }
  for(int i=1;i<=n;i++){
    for(int g=i;g<=n;g++){
      b+=a[i]^a[g];
    }
  }
  cout<<b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:20: error: declaration does not declare anything [-fpermissive]
    4 |   #define int long long;
      |                    ^~~~
a.cc:5:3: note: in expansion of macro 'int'
    5 |   int n,b=0;;
      |   ^~~
a.cc:5:7: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   int n,b=0;;
      |       ^
      |       yn
a.cc:5:9: error: 'b' was not declared in this scope
    5 |   int n,b=0;;
      |         ^
a.cc:4:20: error: declaration does not declare anything [-fpermissive]
    4 |   #define int long long;
      |                    ^~~~
a.cc:7:3: note: in expansion of macro 'int'
    7 |   int a[n+1];
      |   ^~~
a.cc:7:7: error: 'a' was not declared in this scope
    7 |   int a[n+1];
      |       ^
a.cc:4:20: error: declaration does not declare anything [-fpermissive]
    4 |   #define int long long;
      |                    ^~~~
a.cc:8:7: note: in expansion of macro 'int'
    8 |   for(int i=1;i<=n;i++){
      |       ^~~
a.cc:8:11: error: 'i' was not declared in this scope
    8 |   for(int i=1;i<=n;i++){
      |           ^
a.cc:8:19: error: expected ')' before ';' token
    8 |   for(int i=1;i<=n;i++){
      |      ~            ^
      |                   )
a.cc:8:20: error: 'i' was not declared in this scope
    8 |   for(int i=1;i<=n;i++){
      |                    ^
a.cc:4:20: error: declaration does not declare anything [-fpermissive]
    4 |   #define int long long;
      |                    ^~~~
a.cc:11:7: note: in expansion of macro 'int'
   11 |   for(int i=1;i<=n;i++){
      |       ^~~
a.cc:11:19: error: expected ')' before ';' token
   11 |   for(int i=1;i<=n;i++){
      |      ~            ^
      |                   )
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <algorithm>

using namespace std;

typedef long long int LL;

int main()
{
	ios_base::sync_with_stdio(false);
	cout.tie(NULL);
	cin.tie(NULL);


	int N;
	LL answer = 0;
	LL div = pow(10,9) + 7;
	cin >> N;

	vector<LL> arr(N + 1);

	for (int i = 1; i <= N; i++)
		cin >> arr[i];


	for (int i = 1; i <= N - 1; i++)
	{
		for (int j = i + 1; j <= N; j++)
		{
			answer += (arr[i] ^ arr[j]);
		}
		answer %= div;
	}
	

	cout << answer<< endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: 'pow' was not declared in this scope
   21 |         LL div = pow(10,9) + 7;
      |                  ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
const int M = 1e9+7;
__int64 ans[3 * N + 10];
int main(){
	int N;
	cin >> N;
	for(int i=1;i<=N;i++){
		scanf("%I64d",&ans[i]);
	}
	long long sum=0;
	for(int i=1;i<=N;i++){
		for(int j=i+1;j<=N;j++){
			sum+=(ans[i] ^ ans[j] ) % M;
		}
	}
	printf("%lld",sum % M);
	return 0;
}

Compiler output:
a.cc:5:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    5 | __int64 ans[3 * N + 10];
      | ^~~~~~~
      | __int64_t
a.cc: In function 'int main()':
a.cc:10:32: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |                 scanf("%I64d",&ans[i]);
      |                                ^~~
      |                                abs
a.cc:15:31: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |                         sum+=(ans[i] ^ ans[j] ) % M;
      |                               ^~~
      |                               abs
Language: C++

#include<iostream>
int main(){
  int N;
  long A[300001];
  long result = 0;
  std :: cin >> N;
  for(int i = 1; i<=N;i++){
    std::cin >> A[i];
  }
  for(int i = 1; i<=N - 1;i++){
    for(int j = i+1;j<=N;j++){
      result += (A[i]^A[j])
    }
  }
  result = result % (1000000000+7);
  std :: cout << result;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: expected ';' before '}' token
   12 |       result += (A[i]^A[j])
      |                            ^
      |                            ;
   13 |     }
      |     ~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_map>
#include <functional>
#include <utility>
#include <tuple>
#include <cctype>
#include <bitset>
#include <complex>
#include <cmath>
#include <array>
#include <numeric>
using namespace std;
#define INF 0x3f3f3f3f
#define INFLL 0x3f3f3f3f3f3f3f3fLL
//#define MOD 998244353
#define MOD 1000000007
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pint;
typedef pair<ll,ll> pll;
typedef tuple<int,int,int> tint;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<ull> vull;
typedef vector<pint> vpint;
int dx[8]={0,0,-1,1,1,1,-1,-1};
int dy[8]={-1,1,0,0,1,-1,1,-1};
const int SIZE=50;
//↑templete
signed main(){
	int N;
	cin>>N;
	vll A;
	for(int i=0;i<N;i++){
		ll a;
		cin>>a;
		A.pb(a);
	}
	ll plu=0, and=0;
	for(int i=0;i<N;i++){
		(plu+=(A[i]%MOD)*(N-1))%=MOD;
	}
	for(int i=0;i<61;i++){
		//i bit目が立っている数字の数を数える
		ll cnt=0;
		for(ll a:A)
			if((a>>i)&1)
				cnt++;
		ll temp=cnt*(cnt-1)/2%MOD;
		temp%=MOD;
		temp*=(2LL<<i)%MOD;
		temp%=MOD;
		and+=temp;
		//cout<<i<<" "<<temp<<endl;
		and%=MOD;
		//(and+=(cnt)*(cnt-1)/2%MOD*((1LL<<i)%MOD)%MOD)%=MOD;
	}
	//(and*=2)%=MOD;
	//cout<<plu<<" "<<and<<endl;
	cout<<(plu+MOD-and)%MOD<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:22: error: expected unqualified-id before '=' token
   58 |         ll plu=0, and=0;
      |                      ^
a.cc:72:20: error: expected identifier before '+=' token
   72 |                 and+=temp;
      |                    ^~
a.cc:74:20: error: expected identifier before '%=' token
   74 |                 and%=MOD;
      |                    ^~
a.cc:79:27: error: expected identifier before ')' token
   79 |         cout<<(plu+MOD-and)%MOD<<endl;
      |                           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,b=0;;
  cin>>n;
  int a[n+1];
  for(int i=1;i<=n;i++){
    cin>>a[i];
  }
  for(int i=1;i<=n;i++){
    for(Int g=i;g<=n;g++){
      b+=a[i]^a[g];
    }
  }
  cout<<b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'Int' was not declared in this scope; did you mean 'int'?
   11 |     for(Int g=i;g<=n;g++){
      |         ^~~
      |         int
a.cc:11:17: error: 'g' was not declared in this scope
   11 |     for(Int g=i;g<=n;g++){
      |                 ^
Language: C++

#define _USE_MATH_DEFINES

#pragma GCC optimize("Ofast,no-stack-protector") 
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") 
#pragma GCC optimize("unroll-loops") 
#pragma GCC optimize("fast-math")
  
#include <bits/stdc++.h> 
  
using namespace std;
  
#define $(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define endl '\n'
#define x first
#define y second    
#define int long long
#define double long double       
#define vec vector            
#define pb push_back
#define pii pair<int, int>
#define pdd pair<double, double> 
#define beg begin
  
#ifdef LOCAL
    #define dbg(x) cerr << #x << " = " << x << endl;
#else 
    #define dbg(x)
#endif 
  
template<class T> ostream& operator<<(ostream &str, vector<T> &a) {
    for (auto &i : a) {
        str << i << " ";
    }
    return str;
}
  
template<class T> istream& operator>>(istream &str, vector<T> &a) {
    for (auto &i : a) {
        str >> i; 
    }
    return str;
}
  
template<class T> ostream& operator<<(ostream &str, pair<T, T> &a) {
    str << a.first << " " << a.second;
    return str;
}
  
template<class T> istream& operator>>(istream &str, pair<T, T> &a) {
    str >> a.first >> a.second;
    return str;
}
 
void solve(); signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);                                       
    // freopen("output.txt", "w", stdout);
#endif
    srand(time(0));
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cout.setf(ios::fixed); cout.precision(6);
    solve();   
    return 0;
}

const int MOD = 1e9 + 7;
int cnt1[65], cnt0[65];

void solve() {
    int n; 
    cin >> n;
    for (int i = 0; i < n; ++i) {
        int num; 
        cin >> num;
        for (int j = 0; j < 60; ++j) {
            if ((num >> j) & 1) {
                cnt1[j]++;
            }
            else {
                cnt0[j]++;
            }
        }
    }
    int ans = 0;
    int p = 1;
    for (int i = 0; i < 64; ++i) {  
        if (cnt1[i] == 0 || cnt2[i] == 0) continue;
        p %= MOD;
        ans = (ans + (p * cnt1[i] % MOD) * cnt0[i] % MOD) % MOD;
        p *= 2;
    }

    cout << ans << endl;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:89:29: error: 'cnt2' was not declared in this scope; did you mean 'cnt1'?
   89 |         if (cnt1[i] == 0 || cnt2[i] == 0) continue;
      |                             ^~~~
      |                             cnt1
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); 
#define test ll t; cin>>t; while(t--)
#define mod 1e9+7
ll sum(ll a[],ll n) 
{ 
    ll s=0,i;
    for ( i = 0; i < 32; i++)  
    {
        ll su,e=0,o=0;  
        for (int j = 0; j < n; j++) 
        { 
            if (a[j] % 2 == 0) 
                e++;
            else
                o++; 
            a[j] /= 2; 
        } 
        su=e*o*pow(2,i);  
        s+=su;  
    } 
    return s; 
}
int main() {
	fast;
	ll n,i,x;
	cin>>n;
	ll a[n+1];
	for(i=0;i<n;i++)cin>>a[i];
	x=sum(a,n);
	cout<<x%mod;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:16: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
   33 |         cout<<x%mod;
      |               ~^
      |               |
      |               ll {aka long long int}
Language: C++

#include<bits/stdc++.h>
#define mod 10e9+7
#define ll long long unsigned int
using namespace std;
vector<ll>input;
int main()
{
  ll n;
  scanf("%d",&n);
  for(ll i=0;i<n;i++)
  {
    ll num;
    scanf("%lld",&num);
    input.emplace_back(num);
  }
  int i,j,k;
  ll ans=0;
      for(i=0;i<64;i++)
    {
        k=0; // k is the number of set bits in the array at ith psotion
        for(j=0;j<n;j++)
            if((input[j] & (1<<i)))
                k++;
        /* there are k set bits and n-k unset bits.
            therefore number of pairs with one set bit and one unset bit is kC1 and n-kC1
            Every pair adds 2^i in the answer.
        */
        ans+= ((1<<i)*(k*(n-k)))%mod;     
    }
  printf("%lld\n",ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:33: error: invalid operands of types 'long long unsigned int' and 'double' to binary 'operator%'
   28 |         ans+= ((1<<i)*(k*(n-k)))%mod;
      |               ~~~~~~~~~~~~~~~~~~^
      |                      |
      |                      long long unsigned int
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  unsigned int n, i, j;
  unsigned long long int a[300000], s=0;
  const unigned int m = 1000000007;
  cin>>n;
  for(i=0;i<n;i++){
    cin>>a[i];
  }
  for(i=0;i<n-1;i++){
    for(j=i+1;j<n;j++){
      s+=(a[i]^a[j]);
      s=s%m;
    }
  }
  cout<<s;
  return 0;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'unigned' does not name a type; did you mean 'unsigned'?
    6 |   const unigned int m = 1000000007;
      |         ^~~~~~~
      |         unsigned
a.cc:14:11: error: 'm' was not declared in this scope
   14 |       s=s%m;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define endl '\n'
#define f1 first
#define s2 second
#define pb push_back
#define mp make_pair
#define ll long long
#define fri(a) freopen(a,"r",stdin);
#define fro(a) freopen(a,"w",stdout);
const int N=1e5+4;
const int mod=1e9+7;

ll n,pre[65][N],a,dizi[N],ans;

int main(){
	//fri("in.txt");
	//fro("out.txt");
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>dizi[i];
	}
	for(ll i=0;i<63;i++){
		pre[i][0]=0;
		for(ll j=1;j<=n;j++){
			pre[i][j]=pre[i][j-1]+((dizi[j]&((ll)1<<i))!=0);
			//cout<<i<<" "<<j<<" "<<pre[i][j]<<endl;
		}
	}
	//cout<<pre[0][3]-pre[0][1]<<endl;
	for(int i=0;i<61;i++){
		for(int j=1;j<=n;j++){
			if(((dizi[j]&((ll)1<<i))==0)ans+=(pre[i][n]-pre[i][j])%mod)*(pow(2,i)%mod);
			else ans+=((n-(pre[i][n]-pre[i][j]+j))%mod)*(pow(2,i)%mod);
			ans%=mod;
		}
	}
	cout<<ans<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:53: error: expected ')' before 'ans'
   36 |                         if(((dizi[j]&((ll)1<<i))==0)ans+=(pre[i][n]-pre[i][j])%mod)*(pow(2,i)%mod);
      |                           ~                         ^~~
      |                                                     )
a.cc:36:94: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'const int' to binary 'operator%'
   36 |                         if(((dizi[j]&((ll)1<<i))==0)ans+=(pre[i][n]-pre[i][j])%mod)*(pow(2,i)%mod);
      |                                                                                      ~~~~~~~~^~~~
      |                                                                                         |     |
      |                                                                                         |     const int
      |                                                                                         __gnu_cxx::__promote<double>::__type {aka double}
a.cc:37:78: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'const int' to binary 'operator%'
   37 |                         else ans+=((n-(pre[i][n]-pre[i][j]+j))%mod)*(pow(2,i)%mod);
      |                                                                      ~~~~~~~~^~~~
      |                                                                         |     |
      |                                                                         |     const int
      |                                                                         __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 9999999999999999;
using ll = long long;
ll two[61];

string binary(ll bina){
    ll ans = 0;
    for (ll i = 0; bina>0 ; i++)
    {
        ans = ans+(bina%2)*pow(10,i);
        bina = bina/2;
    }
	string s = to_string(ans);
    return s;
}

int main(){
  for(ll i = 0;i<61;i++){
    two[i] = 0;
  }
  ll N;
  cin>>N;
  ll kazu[N];
  for(ll i = 0;i<N;i++){
    cin>>kazu[i];
  }
  for(ll i = 0;i<N;i++){
    string tow = binary(kazu[i]);
    for(ll k = tow.size()-1;k>=0;k--){
      if(tow.at(k) == '1'){
        two[k]++;
      }
    }
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:36:4: error: expected '}' at end of input
   36 |   }
      |    ^
a.cc:19:11: note: to match this '{'
   19 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;


int main()
{
	int n;
	cin>>n;
	ll arr[n+1];
	ll sum = 0;
	for(int i = 0;i<n;i++)
		cin>>arr[i];
	for(i = 1;i<n;i++)
	{
		for(int j = i+1;j<=n;j++)
		{
			sum = sum + arr[i]^arr[j];
		}
	}
	cout<<sum<<'\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'i' was not declared in this scope
   14 |         for(i = 1;i<n;i++)
      |             ^
Language: C++

#include <bits/stdc++.h>
// #include <atcoder/all>
using namespace std;
using namespace atcoder;

// 型定義
typedef long long ll;
typedef pair<ll, ll> P;

// forループ
#define REP(i,n) for(ll i=0; i<(ll)(n); ++i)

// 定数宣言
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

// グラフ表現
using Graph = vector<vector<int>>;

// グラフの辺表現
using Edge = map<pair<int,int>,int>;

// n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

// 最大公約数
ll gcd(ll a,ll b){
   if (a%b == 0) return(b);
   else return(gcd(b, a%b));
}

// 最小公倍数
ll lcm(ll a, ll b){
    return a/gcd(a, b) * b;
}

ll dp[85][85][1400];

int main()
{
    cout << fixed << setprecision(15);
    ll H, W;
    cin >> H >> W;

    vector<vector<ll>> A(H+1, vector<ll>(W+1, 0));
    vector<vector<ll>> B(H+1, vector<ll>(W+1, 0));

    for(ll i=1; i<=H; i++){
        for(ll j=1; j<=W; j++){
            cin >> A[i][j];
        }
    }

    for(ll i=1; i<=H; i++){
        for(ll j=1; j<=W; j++){
            cin >> B[i][j];
        }
    }

    Fill(dp, 0);

    ll a = A[1][1];
    ll b = B[1][1];

    dp[1][1][abs(a-b)] = 1;

    for(ll i=1; i<=H; i++){
        for(ll j=1; j<=W; j++){
            REP(k, 1300){
                a = A[i][j];
                b = B[i][j];
                dp[i][j][abs(k+abs(a-b))] = max(dp[i][j][abs(k+abs(a-b))], dp[i-1][j][k]);
                dp[i][j][abs(k-abs(a-b))] = max(dp[i][j][abs(k-abs(a-b))], dp[i-1][j][k]);

                dp[i][j][abs(k+abs(a-b))] = max(dp[i][j][abs(k+abs(a-b))], dp[i][j-1][k]);
                dp[i][j][abs(k-abs(a-b))] = max(dp[i][j][abs(k-abs(a-b))], dp[i][j-1][k]);
            }
        }
    }

    REP(k, 1300){
        if(dp[H][W][k]){
            cout << k << endl;
            return 0;
        }
    }
    return 0;
}

Compiler output:
a.cc:4:17: error: 'atcoder' is not a namespace-name
    4 | using namespace atcoder;
      |                 ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;

// 型定義
typedef long long ll;
typedef pair<ll, ll> P;

// forループ
#define REP(i,n) for(ll i=0; i<(ll)(n); ++i)

// 定数宣言
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

// グラフ表現
using Graph = vector<vector<int>>;

// グラフの辺表現
using Edge = map<pair<int,int>,int>;

// n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

// 最大公約数
ll gcd(ll a,ll b){
   if (a%b == 0) return(b);
   else return(gcd(b, a%b));
}

// 最小公倍数
ll lcm(ll a, ll b){
    return a/gcd(a, b) * b;
}

ll dp[85][85][1400];

int main()
{
    cout << fixed << setprecision(15);
    ll H, W;
    cin >> H >> W;

    vector<vector<ll>> A(H+1, vector<ll>(W+1, 0));
    vector<vector<ll>> B(H+1, vector<ll>(W+1, 0));

    for(ll i=1; i<=H; i++){
        for(ll j=1; j<=W; j++){
            cin >> A[i][j];
        }
    }

    for(ll i=1; i<=H; i++){
        for(ll j=1; j<=W; j++){
            cin >> B[i][j];
        }
    }

    Fill(dp, 0);

    ll a = A[1][1];
    ll b = B[1][1];

    dp[1][1][abs(a-b)] = 1;

    for(ll i=1; i<=H; i++){
        for(ll j=1; j<=W; j++){
            REP(k, 1300){
                a = A[i][j];
                b = B[i][j];
                dp[i][j][abs(k+abs(a-b))] = max(dp[i][j][abs(k+abs(a-b))], dp[i-1][j][k]);
                dp[i][j][abs(k-abs(a-b))] = max(dp[i][j][abs(k-abs(a-b))], dp[i-1][j][k]);

                dp[i][j][abs(k+abs(a-b))] = max(dp[i][j][abs(k+abs(a-b))], dp[i][j-1][k]);
                dp[i][j][abs(k-abs(a-b))] = max(dp[i][j][abs(k-abs(a-b))], dp[i][j-1][k]);
            }
        }
    }

    REP(k, 1300){
        if(dp[H][W][k]){
            cout << k << endl;
            return 0;
        }
    }
    return 0;
}

Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
using namespace std;
#define ll long long 

int main() {
  int h,w;
  cin >> h >> w;
  
  int a[h+1][w+1]  = {};
  int tmp;
  for(int i = 1;i<h+1;i++){
    for(int j = 1;j<w+1;j++){
      cin >> tmp;
      a[i][j] = tmp;
    }
  }
  for(int i = 1;i<h+1;i++){
    for(int j = 1;j<w+1;j++){
      cin >> tmp;
      a[i][j] = abs(tmp-a[i][j]);
    }
  }
  ll dp[81][81][80*160+1] = {};
  dp[1][1][a[1][1]] = 1;
  
  for(int i = 1;i<h+1;i++){
    for(int j = 1;j<w+1;j++){
      if(i == 1 && j == 1){continue;}
      for(int k = 0;k<=80*160 ;k++){
        if(i>1){
          if(dp[i-1][j][abs(k-a[i][j])] ==1 ||dp[i-1][j][abs(k+a[i][j])] ==1){
            dp[i][j][k] = 1;
          }
        }
        if(j>1){
          if(dp[i][j-1][abs(k-a[i][j])] ==1 ||dp[i][j-1][abs(k+a[i][j])] ==1){
            dp[i][j][k] = 1;
          }
        }
      }
    }
  }
  int res;
  for(int i = 0;i<12800;i++){
    if(dp[h][w][i] == 1){
      res = i
      break;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:14: error: expected ';' before 'break'
   47 |       res = i
      |              ^
      |              ;
   48 |       break;
      |       ~~~~~
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
using namespace std;
#define ll long long 
 
int main() {
  int h,w;
  cin >> h >> w;
  
  int a[h+1][w+1]  = {};
  int tmp;
  for(int i = 1;i<h+1;i++){
    for(int j = 1;j<w+1;j++){
      cin >> tmp;
      a[i][j] = tmp;
    }
  }
  for(int i = 1;i<h+1;i++){
    for(int j = 1;j<w+1;j++){
      cin >> tmp;
      a[i][j] = abs(tmp-a[i][j]);
    }
  }
  ll dp[81][81][80*160+1] = {};

Compiler output:
a.cc: In function 'int main()':
a.cc:24:32: error: expected '}' at end of input
   24 |   ll dp[81][81][80*160+1] = {};
      |                                ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  ll n,m;
  cin>>n>>m;
  vector<vector<ll>> mat1(n,vector<ll>(m)),mat2(n,vector<ll>(m)),mat(n,vector<ll>(m));
  for(ll i=0;i<n;i++)
    for(ll j=0;j<m;j++)
      cin>>mat1[i][j];
 for(ll i=0;i<n;i++)
    for(ll j=0;j<m;j++)
      cin>>mat2[i][j];
 for(ll i=0;i<n;i++)
    for(ll j=0;j<m;j++)
      mat[i][j] = abs(mat1[i][j] - mat2[i][j]);
  vector<vector<vector<bool>>> dp(n,vector<vector<ll>>(m,vector<ll>6400)));
  dp[0][0][mat[0][0]] = true;
  for(ll i=0;i<n;i++){
    for(ll j=0;j<m;j++){
      for(ll k=0;k<6400;k++){
        if(i+1<n && k+mat[i+1][j]<6400 && dp[i][j][k])
          dp[i+1][j][k+mat[i+1][j]] = true;
        if(i+1<n && dp[i][j][k])
          dp[i+1][j][abs(k-mat[i+1][j])] = true;
        if(j+1<m && k+mat[i][j+1]<6400 && dp[i][j][k])
          dp[i][j+1][k+mat[i][j+1]] = true;
        if(j+1<m && dp[i][j][k])
          dp[i][j+1][abs(k-mat[i][j+1])] = true;
      }
    }
  }
  ll i =0;
  for(i =0;i<6400;i++)
    if(dp[n-1][m-1][i])
      break;
  cout<<i<<endl;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:17:55: error: expected primary-expression before '(' token
   17 |   vector<vector<vector<bool>>> dp(n,vector<vector<ll>>(m,vector<ll>6400)));
      |                                                       ^
a.cc:17:68: error: expected primary-expression before numeric constant
   17 |   vector<vector<vector<bool>>> dp(n,vector<vector<ll>>(m,vector<ll>6400)));
      |                                                                    ^~~~
a.cc:17:74: error: expected ',' or ';' before ')' token
   17 |   vector<vector<vector<bool>>> dp(n,vector<vector<ll>>(m,vector<ll>6400)));
      |                                                                          ^
Language: C++

#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
using namespace std;
#define rep(i, j, n) for (int i = j; i < (int)n; ++i)

bool dp[81][81][1280];

ll a[80][80], b[80][80], c[80][80];

int main() {
  int h, w;
  cin >> h >> w;
  rep(i, 0, h) rep(j, 0, w) cin >> a[i][j];
  rep(i, 0, h) rep(j, 0, w) cin >> b[i][j];
  rep(i, 0, h) rep(j, 0, w) c[i][j] = abs(a[i][j] - b[i][j]);

  dp[0][0][c[0][0]] = true;
  rep(i, 0, h) rep(j, 0, w) rep(k, 0, 1111) {
    if (i) {
      dp[i][j][k + c[i][j]] |= dp[i - 1][j][k];
      dp[i][j][abs(k - c[i][j])] |= dp[i - 1][j][k];
    }
    if (j) {
      dp[i][j][k + c[i][j]] |= dp[i][j - 1][k];
      dp[i][j][abs(k - c[i][j])] |= dp[i][j - 1][k];
    }
  }

  rep(i, 0, 1111) if (dp[h - 1][w - 1][i]) {
    cout << i << endl;
    return 0;
  }
  return 1;
}

Compiler output:
a.cc:14:1: error: 'll' does not name a type
   14 | ll a[80][80], b[80][80], c[80][80];
      | ^~
a.cc: In function 'int main()':
a.cc:19:36: error: 'a' was not declared in this scope
   19 |   rep(i, 0, h) rep(j, 0, w) cin >> a[i][j];
      |                                    ^
a.cc:20:36: error: 'b' was not declared in this scope
   20 |   rep(i, 0, h) rep(j, 0, w) cin >> b[i][j];
      |                                    ^
a.cc:21:29: error: 'c' was not declared in this scope
   21 |   rep(i, 0, h) rep(j, 0, w) c[i][j] = abs(a[i][j] - b[i][j]);
      |                             ^
a.cc:21:43: error: 'a' was not declared in this scope
   21 |   rep(i, 0, h) rep(j, 0, w) c[i][j] = abs(a[i][j] - b[i][j]);
      |                                           ^
a.cc:21:53: error: 'b' was not declared in this scope
   21 |   rep(i, 0, h) rep(j, 0, w) c[i][j] = abs(a[i][j] - b[i][j]);
      |                                                     ^
a.cc:23:12: error: 'c' was not declared in this scope
   23 |   dp[0][0][c[0][0]] = true;
      |            ^
Language: C

#include <stdio.h>
#include <stdlib.h>
 
#define MAX 6400
 
int main()
{
	int i, j, H, W, A[82][82], B[82][82], D[82][82];
	scanf("%d %d", &H, &W);
	for (i = 1; i <= H; i++) {
		for (j = 1; j <= W; j++) scanf("%d", &(A[i][j]));
	}
	for (i = 1; i <= H; i++) {
		for (j = 1; j <= W; j++) {
			scanf("%d", &(B[i][j]));
			D[i][j] = abs(A[i][j] - B[i][j]);
		}
	}
	
	int k, dp[2][82][MAX + 1] = {};
	for (j = 2, dp[1][1][D[1][1]] = 1; j <= W; j++) {
		for (k = 0; k <= MAX; k++) {
			if (dp[1][j-1][k] == 1) {
				dp[1][j][abs(k - D[1][j])] = 1;
				if (k + D[1][j] <= MAX) dp[1][j][k + D[1][j]] = 1;
			}
		}
	}
	for (i = 2; i <= H; i++) {
		for (j = 1; j <= W; j++) {
			for (k = 0; k <= MAX; k++) dp[i%2][j][k] = 0;
		}
		for (k = 0; k <= MAX; k++) {
			if (dp[1-i%2][1][k] == 1) {
				dp[i%2][1][abs(k - D[i][1])] = 1;
				if (k + D[i][1] <= MAX) dp[i%2][1][k + D[i][1]] = 1;
			}
		}
		for (j = 2; j <= W; j++) {
			for (k = 0; k <= MAX; k++) {
				if (dp[i%2][j-1][k] == 1) {
					dp[i%2][j][abs(k - D[i][j])] = 1;
					if (k + D[i][j] <= MAX) dp[i%2][j][k + D[i][j]] = 1;
				}
				if (dp[1-i%2][j][k] == 1) {
					dp[i%2][j][abs(k - D[i][j])] = 1;
					if (k + D[i][j] <= MAX) dp[i%2][j][k + D[i][j]] = 1;
				}
			}
		}
	}
	
	for (k = 0; k <= MAX; k++) if (dp[H%2][W][k] == 1) break;
	printf("%d\n", k);
	fflush(stdout);
	return 0;
  

Compiler output:
main.c: In function 'main':
main.c:56:9: error: expected declaration or statement at end of input
   56 |         return 0;
      |         ^~~~~~
Language: C++

#include<iostream>
#include<vector>
#define lli long long int
#define pb push_back
using namespace std;


int main()
{
    
    int h,w,i,j;
    cin>>h>>w;
    
    vector<vector<int>>dp1(h+1,vector<int>(w+1));
    vector<vector<int>>dp2(h+1,vector<int>(w+1));
    vector<vector<int>>dp3(h+1,vector<int>(w+1));
    
    for(i=1;i<=h;i++)
        for(j=1;j<=w;j++)
            cin>>dp1[i][j];
    
    for(i=1;i<=h;i++)
        for(j=1;j<=w;j++)
            cin>>dp2[i][j];
    
    for(i=1;i<=h;i++)
        for(j=1;j<=w;j++)
            dp3[i][j] = abs(dp1[i][j]-dp2[i][j]);
    
    vector<vector<vector<int>>>dp(h+1,vector<vector<int>>(w+1,vector<int>(6401,0)));
    
    dp[h][w][abs(dp3[h][w])] = 1;
    
    for(i=h,j=w-1;j>=1;j--)
        for(int k=0;k<=6400;k++)
            if(dp[i][j+1][k]==1)
            {
                dp[i][j][abs(k+dp3[i][j])] = 1;
                dp[i][j][abs(k-dp3[i][j])] = 1;
            }
    
    for(i=h-1;i>=1;i--)
    {
        for(j=w;j>=1;j--)
        {
            if(j==w)
            {
                for(int k=0;k<=6400;k++)
                    if(dp[i+1][j][k]==1)
                    {
                        dp[i][j][abs(k+dp3[i][j])] = 1;
                        dp[i][j][abs(k-dp3[i][j])] = 1;
                    }
            }
            
            else
            {
                for(int k=0;k<=6400;k++)
                {
                    if(dp[i+1][j][k]==1)
                    {
                        dp[i][j][abs(k+dp3[i][j])] = 1;
                        dp[i][j][abs(k-dp3[i][j])] = 1;
                    }
                    if(dp[i][j+1][k]==1)
                    {
                        dp[i][j][abs(k+dp3[i][j])] = 1;
                        dp[i][j][abs(k-dp3[i][j])] = 1;
                    }
                }
            
            }
        }
    }
    
    
    int mymin = INT_MAX;
    for(int k=0;k<=6400;k++)
    {
        if(dp[1][1][k]==1) mymin = min(k,mymin);
        
    }
    cout<<mymin<<endl;
    
    
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:77:17: error: 'INT_MAX' was not declared in this scope
   77 |     int mymin = INT_MAX;
      |                 ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include<vector>
  +++ |+#include <climits>
    3 | #define lli long long int
Language: C++

//コンパイラ最適化用
#pragma GCC optimize("Ofast")
//インクルード(アルファベット順)
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<chrono>//実行時間計測
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm,accumulate
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//順序保持しないmap
#include<unordered_set>//順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列

using namespace std;
typedef long long ll;

//マクロ
//forループ
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) x.begin(),x.end() 
#define SIZE(x) ll(x.size()) 
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素

signed main(){
    //入力の高速化用のコード
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    ll h,w;cin>>h>>w;
    vector<vector<ll>> ab(h,vector<ll>(w,0));
    vector<vector<ll>> b(h,vector<ll>(w));
    REP(i,h)REP(j,w)cin>>ab[i][j];
    REP(i,h)REP(j,w){cin>>b[i][j];ab[i][j]-=b[i][j]}
    vector<vector<unordered_set<ll>>> dp(h,vector<unordered_set<ll>>(w,unordered_set<ll>()));
    dp[0][0]={ab[0][0],-ab[0][0]};
    REP(i,h){
        REP(j,w){
            if(i!=h-1){
                for(const auto& g:dp[i][j]){
                    if(abs(g+ab[i+1][j])<=(h-1+w-1-i-j-1)*80)dp[i+1][j].insert(g+ab[i+1][j]);
                    if(abs(g-ab[i+1][j])<=(h-1+w-1-i-j-1)*80)dp[i+1][j].insert(g-ab[i+1][j]);
                }
            }
            if(j!=w-1){
                for(const auto& g:dp[i][j]){
                    if(abs(g+ab[i][j+1])<=(h-1+w-1-i-j-1)*80)dp[i][j+1].insert(g+ab[i][j+1]);
                    if(abs(g-ab[i][j+1])<=(h-1+w-1-i-j-1)*80)dp[i][j+1].insert(g-ab[i][j+1]);
                }
            }
        }
    }
    ll ans=INF;
    for(const auto& g:dp[h-1][w-1]){
        if(abs(g)<ans)ans=abs(g);
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:52: error: expected ';' before '}' token
   57 |     REP(i,h)REP(j,w){cin>>b[i][j];ab[i][j]-=b[i][j]}
      |                                                    ^
      |                                                    ;
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i = 0; i < (ll)(n); i++)
#define inf 1000000000000000000
#define mod 1000000007
#define mod2 998244353
#define pi acos(-1)
#define all(x) (x).begin(),(x).end()
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << setprecision(15) << fixed;
  
  ll h, w; cin >> h >> w;
  vector<vector<ll>> a(h, vector<ll>(w));
  vector<vector<ll>> b(h, vector<ll>(w));
  vector<vector<ll>> c(h, vector<ll>(w));
  rep(i, h) {
    rep(j, w) {
      cin >> a[i][j];
    }
  }
  rep(i, h) {
    rep(j, w) {
      cin >> b[i][j];
    }
  }
  rep(i, h) {
    rep(j, w) {
      c[i][j] = abs(a[i][j] - b[i][j]);
    }
  }

  vector<vector<vector<ll>>> dp(h, vector<vector<ll>>(w,vector<ll>(80 * (h + w) + 1, false));
  dp[0][0][c[0][0]] = true;
  rep(i, h) {
    rep(j, w) {
      rep(k, 80 * (h + w) + 1) {
        if (0 <= i + 1 && i + 1 < h && dp[i][j][k]) {
          if (0 <= k + c[i + 1][j] && k + c[i + 1][j] <= 80 * (h + w)) dp[i + 1][j][k + c[i + 1][j]] = true;
          if (0 <= abs(k - c[i + 1][j]) && abs(k - c[i + 1][j]) <= 80 * (h + w)) dp[i + 1][j][abs(k - c[i + 1][j])] = true;
        }
        if (0 <= j + 1 && j + 1 < w && dp[i][j][k]) {
          if (0 <= k + c[i][j + 1] && k + c[i][j + 1] <= 80 * (h + w)) dp[i][j + 1][k + c[i][j + 1]] = true;
          if (0 <= abs(k - c[i][j + 1]) && abs(k - c[i][j + 1]) <= 80 * (h + w)) dp[i][j + 1][abs(k - c[i][j + 1])] = true;
        }
      }
    }
  }
  rep(k, 80 * (h + w) + 1) {
    if (dp[h - 1][w - 1][k]) {
      cout << k << endl;
      exit(0);
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:93: error: expected ')' before ';' token
   39 |   vector<vector<vector<ll>>> dp(h, vector<vector<ll>>(w,vector<ll>(80 * (h + w) + 1, false));
      |                                ~                                                            ^
      |                                                                                             )
Language: C++

import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

h, w = map(int, input().split())
a = [[int(x) for x in input().split()] for _ in range(h)]
b = [[int(x) for x in input().split()] for _ in range(h)]
c = [[0]*w for _ in range(h)]
for i in range(h):
    for j in range(w):
        c[i][j] = abs(a[i][j] - b[i][j])
dp = [[[False]*(80 * (h + w) + 1) for _ in range(w)] for _ in range(h)]
dp[0][0][c[0][0]] = True
for i in range(h):
    for j in range(w):
        for k in range(80 * (h + w) + 1):
            # print(i, j, k, k + c[i][j + 1])
            if 0 <= i + 1 < h:
                if 0 <= k + c[i + 1][j] <= 80 * (h + w):
                    dp[i + 1][j][k + c[i + 1][j]] = dp[i][j][k] or dp[i + 1][j][k + c[i + 1][j]]
                if 0 <= abs(k - c[i + 1][j]) <= 80 * (h + w):
                    dp[i + 1][j][abs(k - c[i + 1][j])] = dp[i][j][k] or dp[i + 1][j][abs(k - c[i + 1][j])]
            if 0 <= j + 1 < w:
                if 0 <= k + c[i][j + 1] <= 80 * (h + w):
                    dp[i][j + 1][k + c[i][j + 1]] = dp[i][j][k] or dp[i][j + 1][k + c[i][j + 1]]
                if 0 <= abs(k - c[i][j + 1]) <= 80 * (h + w):
                    dp[i][j + 1][abs(k - c[i][j + 1])] = dp[i][j][k] or dp[i][j + 1][abs(k - c[i][j + 1])]
for k in range(80 * (h + w) + 1):
    if dp[h - 1][w - 1][k]:
        print(k)
        sys.exit()

Compiler output:
a.cc:16:15: error: invalid preprocessing directive #print
   16 |             # print(i, j, k, k + c[i][j + 1])
      |               ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'