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

#include <bits/stdc++.h>
using namespace std;
#define rep0(i, n) for (long long i = 0; i < (long long)(n); i++)
#define rep1(i,n) for(long long i=1;i<=(long long)(n);i++)
#define all(v) v.begin(),v.end()
#define Sort(v) sort(all(v))
#define Reverse(v) reverse(all(v))
#define Rsort(v) sort(all(v),greater)
#define pub(v) push_back(v)
#define pob(v) pop_back(v)
typedef long long ll;
typedef vector<ll> vel;
typedef vector<vector<ll>> vel2d;
typedef string str;
typedef pair<ll,ll> pal;
typedef vector<str> ves;
typedef vector<char> vech;


int main() {
    ll N,M,X;cin>>N>>M>>X;
    vel C(N);vel2d A(N,vel(M));
    rep0(i,N){
        cin>>C[i];
        rep0(j,M){
            cin>>A[i][j];
        }
    }
    ll sum=0;
    rep0(i,M){
        rep0(j,N){sum+=A[j][i];}
        if(sum<X){cout<<-1<<endl;return 0;}
    }
    ll ans=10000000000;
    vel D(M);
    for(ll tmp=0;tmp<(1<<N);tmp++){
        bitset<12> s(tmp);
        ll sum2=0;
        //cout<<s<<endl;
        
        for(ll i=0;i<N;i++){
            if(s.test(i)){
                sum2+=C[i];
                rep0(j,M){D[j]+=A[i][j];}
            }
        }
        //cout<<sum2<<endl;
        ll Min=10000000000;
        rep0(j,M){Min=min(Min,D[j]);}
        //rep0(j,M){cout<<D[j]<<endl;}
        if(Min>=X){ans=min(ans,sum2);}
        //cout<<ans<<endl;
        rep0(j,M){D[j]=0;}
    }
	if(ans==10000000000){cout<<-1<<endl;
    cout<<ans<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:57:2: error: expected '}' at end of input
   57 | }
      |  ^
a.cc:20:12: note: to match this '{'
   20 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double eps = 1e-6;
const int INF = 0x3f3f3f3f;
const int N = 200000 + 5;
const int mod = 1e9+7;
struct node{
	int money;
	int a[15];
}c[15];
 
int main(){
	int n,m,x;
	cin >> n >> m >> x;
	for(int i = 0; i < n; i++){
		cin >> c[i].money;
		for(int j = 0; j < m; j++)
			cin >> c[i].a[j];
	}
	int minn = INF;
	for(int i = 0; i < (1<<n); i++){
		node p;
		p.money = 0;
		for(int j = 0; j < m; j++)
			p.a[j] = 0;
		for(int j = 0; j < n; j++){
			if(i&(1<<j)){
				p.money += c[j].money;
				for(int k = 0;k < m; k++){
					p.a[k] += c[j].a[k];
				}
			}
		}
		int f = 0;
		for(int j = 0;j < m; j++)
			if(p.a[j] < x) 
				f = 1;
		if(f == 0){
			minn = min(minn,p.money);
		}
	}
	if(minn == INF)
		minn = -1;
	cout << minn << endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:46:18: error: expected '}' at end of input
   46 |         return 0;
      |                  ^
a.cc:13:11: note: to match this '{'
   13 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){

long long int i,j,n,m,x;
int flag=0,sum=0;
cin >> n >> m>> x;
int hon[n+1][m+1],ri[n][m]={0};
int c[n];
for(i=1;i<=n;i++){
  cin >> c[i-1];
  for(j=1;j<=m;j++){
    cin >> hon[i][j];
  }
}

sort(c.begin(),c.end());

for(i=1;i<=n;i++){
  for(j=1;j<=m;j++){
    ri[i-1][j-1]+=hon[i][j];
    if(ri[i-1][j-1]<x)flag=0;
  }
  if(flag==0)sum+=c[i-1];
  else break;
}

cout << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: request for member 'begin' in 'c', which is of non-class type 'int [n]'
   18 | sort(c.begin(),c.end());
      |        ^~~~~
a.cc:18:18: error: request for member 'end' in 'c', which is of non-class type 'int [n]'
   18 | sort(c.begin(),c.end());
      |                  ^~~
Language: C++

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


int main() {
  long long n;
  cin >> n;
  const long long N = n;
  
  long long M, X;
  cin >> M >> X;
  
  vector<vector<int>> data(N, vector<int>(M+1));
 
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M + 1; j++) {
      cin >> data.at(i).at(j);
    }
  }
  
   set<int> S;
 
  
  for (int tmp = 0; tmp < (1 << N); tmp++) {
    bitset<N> s(tmp);  
    
    bool have = true;
      for(int j = 0; j < M; j++){
      for (int i = 0; i < N; i++) {
      int sum = 0;
      if (s.test(i)) {
        sum += data.at(i).at(j + 1);
      }
      if(sum < X){
        have = false;
      }
      }
    }
    
    if(have){
      int money = 0;
      for (int i = 0; i < N; i++) {
        if (s.test(i)) {
        money += data.at(i).at(0);
      }
      }
      S.insert(money);
      }
          
     
  if(S.size() == 0){
    cout << -1;
  }
    else{
      cout << *rbegin(S);
    }
        
  
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: the value of 'N' is not usable in a constant expression
   25 |     bitset<N> s(tmp);
      |             ^
a.cc:8:19: note: 'N' was not initialized with a constant expression
    8 |   const long long N = n;
      |                   ^
a.cc:25:13: note: in template argument for type 'long unsigned int'
   25 |     bitset<N> s(tmp);
      |             ^
a.cc:31:13: error: request for member 'test' in 's', which is of non-class type 'int'
   31 |       if (s.test(i)) {
      |             ^~~~
a.cc:43:15: error: request for member 'test' in 's', which is of non-class type 'int'
   43 |         if (s.test(i)) {
      |               ^~~~
a.cc:61:2: error: expected '}' at end of input
   61 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C

#include<stdio.h>
int main(void){
  int i, n, m, x, c[12], a[144];
  scanf("%d%d%d", &n ,&m, &x);
  for(i=0;i<n;i++){
    scanf("%d", &c[i])
  }
  return 0;
}
  
  

Compiler output:
main.c: In function 'main':
main.c:6:23: error: expected ';' before '}' token
    6 |     scanf("%d", &c[i])
      |                       ^
      |                       ;
    7 |   }
      |   ~
Language: C++

import numpy as np
import itertools

n, m, x = map(int, input().split())
calist = []
for i in range(n):
    ca = list(map(int, input().split()))
    calist.append(ca)

# print(n, m, x, calist)

# check
for j in range(m):
    sum = 0
    for i in range(n):
        sum += calist[i][j + 1]
    if sum < x:
        print(-1)
        exit()

calist = np.array(calist)
dp = float('inf')

for comb in range(1, m + 1):
    sc = itertools.combinations(calist, comb)
    sum = 0
    a = np.array([0 for _ in range(m)])
    for ca in sc:
        sum += ca[0]
        a += ca[1:]
    if False not in (a > x) and sum < dp:
        dp = sum

print(dp)


Compiler output:
a.cc:10:3: error: invalid preprocessing directive #print
   10 | # print(n, m, x, calist)
      |   ^~~~~
a.cc:12:3: error: invalid preprocessing directive #check
   12 | # check
      |   ^~~~~
a.cc:22:12: warning: multi-character character constant [-Wmultichar]
   22 | dp = float('inf')
      |            ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

ll X;
ll N, M;
ll cost[1000000];
	vector<ll> v[12];
	vector<pair<double, ll>> par_v[12];

ll checkans(int par)
{
	ll arr[M] = {0};
	ll c = 0;
	for (int i = 0; i < N; i++)
	{
		int pos = par_v[par][i].second;
		c += cost[pos];
		int flag = 0;
		for (int j = 0; j < M; j++)
		{
			arr[j] += v[pos][j];
			if (arr[j] < X)
				flag = 1;
		}
		if (flag == 0)
			return c;
	}
	return -1;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cin >> N >> M >> X;
	for (int i = 0; i < N; i++)
	{
		cin >> cost[i];
		for (int j = 0; j < M; j++)
		{
			ll temp;
			cin >> temp;
			v[i].push_back(temp);
		}
	}
	for (int i = 0; i < M; i++)
	{
		for (int j = 0; j < N; j++)
		{
			par_v[i].push_back({(v[j][i] +0.0)/ (cost[j]+0.0), j});
		}
	}
	for (int i = 0; i < M; i++)
	{
		sort(par_v[i].begin(), par_v[i].end());
		reverse(par_v[i].begin(),par_v[i].end());
	}
	ll finans = 1000000000;
	for (int i = 0; i < M; i++)
	{
		ll temp =  min(finans, checkans(i));
		if(temp != -1)
		finans = min(finans, checkans(i));
	}
	if(finans == 1000000000)
	cout << temp<<endl;
else
	cout << finans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:17: error: 'temp' was not declared in this scope; did you mean 'tm'?
   67 |         cout << temp<<endl;
      |                 ^~~~
      |                 tm
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool Isvalid(vector<pair<int,int>>out,int x){
    int sum=0;
    for(auto it:out)sum+=it.first;
    return sum>=x;
}
bool Valid(int arr[][12],vector<pair<int,int>>v,int x,int m){
    for(int i=2;i<m;i++){
        int sum=0;
        for(auto it:v){
            sum+=arr[it.second][i];
        }
        if(sum<x)return false;
    }
    return true;
}
void Allsubset(vector<int>v,int arr[][12],vector<pair<int,int>>out,int x,int i,int n,int m,int &ans){
    if(i==n){
        if(Isvalid(out,x)){
            if(Valid(arr,out,x,m)){
            for(auto it:v){
               sum+=arr[it.second][0];
             }
            ans=min(ans,sum);
            return;
            }
        }
    }
    out.push_back(make_pair(arr[i][1],i));
    Allsubset(v,arr,out,x,i+1,n,m,ans);
    Allsubset(v,arr,out,x,i+1,n,m,ans);
    return;
}
int main(){
    int n,m,x;
    cin>>n>>m>>x;
    int arr[12][12];
    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++)cin>>arr[i][j];
    }
    vector<int>v;
    for(int i=0;i<n;i++)v.push_back(arr[i][1]);
    vector<pair<int,int>>out;
    int ans=INT_MAX;
    Allsubset(v,arr,x,0,n,m,ans);
    return 0;
}



Compiler output:
a.cc: In function 'void Allsubset(std::vector<int>, int (*)[12], std::vector<std::pair<int, int> >, int, int, int, int, int&)':
a.cc:23:16: error: 'sum' was not declared in this scope
   23 |                sum+=arr[it.second][0];
      |                ^~~
a.cc:23:28: error: request for member 'second' in 'it', which is of non-class type 'int'
   23 |                sum+=arr[it.second][0];
      |                            ^~~~~~
a.cc:25:25: error: 'sum' was not declared in this scope
   25 |             ans=min(ans,sum);
      |                         ^~~
a.cc: In function 'int main()':
a.cc:46:21: error: could not convert 'x' from 'int' to 'std::vector<std::pair<int, int> >'
   46 |     Allsubset(v,arr,x,0,n,m,ans);
      |                     ^
      |                     |
      |                     int
Language: C++

#include <iostream>
using namespace std;
 
int main() {
  int N; // 参考書の冊数
  int M; // 学びたいアルゴリズムの数
  int X; // 達成したい理解度
  cin >> N >> M >> X;
  cout << N << endl;
  cout << M << endl;
  cout << X << endl;
  
  int a = [];
  for (int i = 0; i < N; i++) {
    int C;
    cin >> C;
    for (int j = 0; j < N; j++) {
      int A;
      cin >> A;
    }
  }
  cout << -1 << endl;
  

  return 0;
}

Compiler output:
a.cc: In lambda function:
a.cc:13:13: error: expected '{' before ';' token
   13 |   int a = [];
      |             ^
a.cc: In function 'int main()':
a.cc:13:11: error: invalid user-defined conversion from 'main()::<lambda()>' to 'int' [-fpermissive]
   13 |   int a = [];
      |           ^~
a.cc:13:11: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
   13 |   int a = [];
      |           ^
a.cc:13:11: note:   no known conversion from 'void (*)()' to 'int'
Language: C

int main() {
	int N,M;
	int X, c[100];
	int A[100][12];
	int i,q,p,l;
	int wa[100],hon=0;
	scanf("%d", &N);
	scanf("%d", &M);
	scanf("%d", &X);
	for (i = 0; i < N; i++) {
		scanf("%d", &c[i]);
		hon += c[i];
			for (q = 0; q < M; q++) {
				scanf("%d", &A[i][q]);
				wa[i] = 0;
				wa[i]+= A[i][q];
			}
			if (wa[i] > 0) {
				printf("%d", hon);
				break;
			}
	}
	for (l = 0; l < M; l++) {
		if (wa[i] < M) {
			printf("-1");
			break;
		}
		else {
			printf("%d", hon);
			break;
		}

	}
	

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |         scanf("%d", &N);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main() {
main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |         scanf("%d", &N);
      |         ^~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:19:33: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   19 |                                 printf("%d", hon);
      |                                 ^~~~~~
main.c:19:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:19:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   25 |                         printf("-1");
      |                         ^~~~~~
main.c:25:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   29 |                         printf("%d", hon);
      |                         ^~~~~~
main.c:29:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:33:9: error: expected declaration or statement at end of input
   33 |         }
      |         ^
Language: C++

#include <bits/stdc++.h>
#include <functional>
//#include <iostream>

using namespace std;
typedef long long ll;

inline int at(ll x, int k){ return (x >> k) & 1; }
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define rrep(i,a,b) for(ll i=a;i>=b;i--)

void recursive_comb(int *indexes, int s, int rest, std::function<void(int *)> f) {
  if (rest == 0) {
    f(indexes);
  } else {
    if (s < 0) return;
    recursive_comb(indexes, s - 1, rest, f);
    indexes[rest - 1] = s;
    recursive_comb(indexes, s - 1, rest - 1, f);
  }
}

// nCkの組み合わせに対して処理を実行する
void foreach_comb(int n, int k, std::function<void(int *)> f) {
  int indexes[k];
  recursive_comb(indexes, n - 1, k, f);
}



int main() {
	ll n,m,x;
	cin >> n >> m >> x;
	ll c[n],a[n][m];

	rep(i,0,n){
		cin >> c[i];
		rep(j,0,m){
			cin >> a[i][j];
		}
	}
	ll max = 0;
	rep(k,1,n+1){
		foreach_comb(n, k, [](int *indexes) {
			ll temp=0;
			rep(i,0,k){
				temp += c[indexes[i]];
			}
			if(max<temp){
				max = temp;
			}
  });
	}

	cout << max << endl;

}


Compiler output:
a.cc: In lambda function:
a.cc:46:33: error: 'k' is not captured
   46 |                         rep(i,0,k){
      |                                 ^
a.cc:9:33: note: in definition of macro 'rep'
    9 | #define rep(i,a,b) for(ll i=a;i<b;i++)
      |                                 ^
a.cc:44:37: note: the lambda has no capture-default
   44 |                 foreach_comb(n, k, [](int *indexes) {
      |                                     ^
a.cc:43:13: note: 'll k' declared here
   43 |         rep(k,1,n+1){
      |             ^
a.cc:9:27: note: in definition of macro 'rep'
    9 | #define rep(i,a,b) for(ll i=a;i<b;i++)
      |                           ^
a.cc:47:41: error: 'c' is not captured
   47 |                                 temp += c[indexes[i]];
      |                                         ^
a.cc:44:37: note: the lambda has no capture-default
   44 |                 foreach_comb(n, k, [](int *indexes) {
      |                                     ^
a.cc:34:12: note: 'll c [n]' declared here
   34 |         ll c[n],a[n][m];
      |            ^
a.cc:49:28: error: 'max' is not captured
   49 |                         if(max<temp){
      |                            ^~~
a.cc:44:37: note: the lambda has no capture-default
   44 |                 foreach_comb(n, k, [](int *indexes) {
      |                                     ^
a.cc:42:12: note: 'll max' declared here
   42 |         ll max = 0;
      |            ^~~
a.cc:50:33: error: 'max' is not captured
   50 |                                 max = temp;
      |                                 ^~~
a.cc:44:37: note: the lambda has no capture-default
   44 |                 foreach_comb(n, k, [](int *indexes) {
      |                                     ^
a.cc:42:12: note: 'll max' declared here
   42 |         ll max = 0;
      |            ^~~
Language: C++

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

int main(){
 
  long long N, M, X, i, j;
  cin >> N >> M >> X;
  vector<vector<long long>> A(N, vector<long long>(M, 0));
  vector<long long> A_sum(M), C(N), H(N);
  
  
  for(i = 0; i < N; i++){
    cin >> C.at(i);
    for(j = 0; j < M; j++){
      
      cin >> A.at(i).at(j);
      A_sum.at(j) += A.at(i).at(j);
    }
  }
  for(j = 0; j < M; j++){
    if(A_sum.at(j) < X){
      cout << -1 << endl;
      return 0;
    }
  }
  
  for(long long i = 0; i < N; i++) H.at(i) = i;
  
  do{
    
    
    
  }while(next_permutation(H.begin(), H.end()))
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:47: error: expected ';' before 'return'
   33 |   }while(next_permutation(H.begin(), H.end()))
      |                                               ^
      |                                               ;
   34 | 
   35 |   return 0;
      |   ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	int N;
   	int M;
  	int X;
  cin >> N >> M >> X;
  
  vector<vector<int>>A(N+1,vector<int>(M+1));
	
  for(int i = 1 ; i <= N ; i++){
  	 for(int j = 0 ; j <= M ; j++){
  		cin >> A.at(i).at(j);
  	}
  }
  
  vector<int>all(M+1);
  int flag = 0;
  int money = 0 ;

for(int j = 1 ; j <= M ; j++){  
  for(int i = 1 ; i <= N ; i++){
  	all.at(j) +=  A.at(i).at(j);
    money += A.at(i).at(0);
  }
  if(all.at(j)<X){
  	flag = 1;
  }
}  

  if(flag == 1){
  	cout << "-1" << endl;
  }

  vector<int>min_val(M+1);
  int money_min
   for(int j = 0 ; j <= M ; j++){
   		min.at(j) = all.at(j);
    	money_min = money;
   } 
  
for(int i = 1 ; i <= N ; i++){ 
  for(int j = 1 ; j <= M ; j++){
  		int sum = 0;
    	sum = all.at(j) - A.at(i).at(j);
    	if(sum < X){
        	flag = 1;
        }
  	}
  	if(flag != 1&&money_min - A.at(i).at(0)<=money_min){
    	money_min = money_min - A.at(i).at(0); 
    }
  flag = 0;
  }
  cout << money_min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:4: error: expected initializer before 'for'
   38 |    for(int j = 0 ; j <= M ; j++){
      |    ^~~
a.cc:38:20: error: 'j' was not declared in this scope
   38 |    for(int j = 0 ; j <= M ; j++){
      |                    ^
a.cc:51:23: error: 'money_min' was not declared in this scope
   51 |         if(flag != 1&&money_min - A.at(i).at(0)<=money_min){
      |                       ^~~~~~~~~
a.cc:56:11: error: 'money_min' was not declared in this scope
   56 |   cout << money_min << endl;
      |           ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#define rep(i,n) for (long long i=0; i < (n); ++i)
#define rep2(i,n,m) for(long long i=n;i<=m;i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const ll INF=1e18 ;
inline void chmax(ll& a,ll b){a=max(a,b);}
inline void chmin(ll& a,ll b){a=min(a,b);}
int main() {
 int n ,m ,x ;
 cin >>n >> m>> x ;
 int c[n] ;
 int a[n][m] ;
 
 int min = 2000000 ;
 
 int sum[m] ;

 rep(i,n){
  int yn=0 ;
  int cost=0 ;
  rep(j,1) 
  if(j==1){
    cost+= c[i] ;
    rep(z,m) sum[z]+=a[i][z] ;
   rep(y,m) if(sum[y]<x) yn= -1 ;
   if(yn==0) min= min(min,cost) ;
  } 
  
 }

  cout <<min <<endl ;
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:22: error: 'min' cannot be used as a function
   30 |    if(yn==0) min= min(min,cost) ;
      |                   ~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
//#include <iostream>

using namespace std;
typedef long long ll;

inline int at(ll x, int k){ return (x >> k) & 1; }
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define rrep(i,a,b) for(ll i=a;i>=b;i--)

void recursive_comb(int *indexes, int s, int rest, std::function<void(int *)> f) {
  if (rest == 0) {
    f(indexes);
  } else {
    if (s < 0) return;
    recursive_comb(indexes, s - 1, rest, f);
    indexes[rest - 1] = s;
    recursive_comb(indexes, s - 1, rest - 1, f);
  }
}

// nCkの組み合わせに対して処理を実行する
void foreach_comb(int n, int k, std::function<void(int *)> f) {
  int indexes[k];
  recursive_comb(indexes, n - 1, k, f);
}



int main() {
	ll n,m,x;
	cin >> n >> m >> x;
	ll c[n],a[n][m];

	rep(i,0,n){
		cin >> c[i];
		rep(j,0,m){
			cin >> a[i][j];
		}
	}
	ll max = 0;
	rep(k,1,n+1){
		foreach_comb(n, k, [](int *indexes) {
			ll temp=0;
			rep(i,0,k){
				temp += c[indexes[i]];
			}
			if(max<temp){
				max = temp;
			}
  });
	}

	cout << max << endl;

}


Compiler output:
a.cc: In lambda function:
a.cc:45:33: error: 'k' is not captured
   45 |                         rep(i,0,k){
      |                                 ^
a.cc:8:33: note: in definition of macro 'rep'
    8 | #define rep(i,a,b) for(ll i=a;i<b;i++)
      |                                 ^
a.cc:43:37: note: the lambda has no capture-default
   43 |                 foreach_comb(n, k, [](int *indexes) {
      |                                     ^
a.cc:42:13: note: 'll k' declared here
   42 |         rep(k,1,n+1){
      |             ^
a.cc:8:27: note: in definition of macro 'rep'
    8 | #define rep(i,a,b) for(ll i=a;i<b;i++)
      |                           ^
a.cc:46:41: error: 'c' is not captured
   46 |                                 temp += c[indexes[i]];
      |                                         ^
a.cc:43:37: note: the lambda has no capture-default
   43 |                 foreach_comb(n, k, [](int *indexes) {
      |                                     ^
a.cc:33:12: note: 'll c [n]' declared here
   33 |         ll c[n],a[n][m];
      |            ^
a.cc:48:28: error: 'max' is not captured
   48 |                         if(max<temp){
      |                            ^~~
a.cc:43:37: note: the lambda has no capture-default
   43 |                 foreach_comb(n, k, [](int *indexes) {
      |                                     ^
a.cc:41:12: note: 'll max' declared here
   41 |         ll max = 0;
      |            ^~~
a.cc:49:33: error: 'max' is not captured
   49 |                                 max = temp;
      |                                 ^~~
a.cc:43:37: note: the lambda has no capture-default
   43 |                 foreach_comb(n, k, [](int *indexes) {
      |                                     ^
a.cc:41:12: note: 'll max' declared here
   41 |         ll max = 0;
      |            ^~~
Language: C++

#include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#define rep(i,n) for (long long i=0; i < (n); ++i)
#define rep2(i,n,m) for(long long i=n;i<=m;i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const ll INF=1e18 ;
inline void chmax(ll& a,ll b){a=max(a,b);}
inline void chmin(ll& a,ll b){a=min(a,b);}
int main() {
 int n ,m ,x ;
 cin >>n >> m>> x ;
 int c[n] ;
 int a[n][m] ;
 
 int min = 2000000 ;
 
 int sum[m] ;

 rep(i,n){
  int yn=0 ;
  int cost=0 ;
  rep(j,1) 
  if(j==1){
    cost+= c[i] ;
    rep(z,m) sum[z]+=a[i][z] ;
   rep(y,m) if(sum[y]<x) yn= -1 ;
   if(yn=0) min= min(min,cost) ;
  } 
  
 }

  cout <<min <<endl ;
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:21: error: 'min' cannot be used as a function
   30 |    if(yn=0) min= min(min,cost) ;
      |                  ~~~^~~~~~~~~~
Language: C++

KYashima:Ant_Pro keita_y$ cd "/Users/keita_y/Desktop/Ant_Pro/" && g++ ABC167.c.cpp -o ABC167.c && "/Users/keita_y/Desktop/Ant_Pro/"ABC167.c
3 3 10
60 2 2 4
70 8 7 9
50 2 3 9
-1
KYashima:Ant_Pro keita_y$ cd "/Users/keita_y/Desktop/Ant_Pro/" && g++ ABC167.c.cpp -o ABC167.c && "/Users/keita_y/Desktop/Ant_Pro/"ABC167.c
3 3 10
60 2 2 4
70 8 7 9
50 2 3 9
60
-1
KYashima:Ant_Pro keita_y$ cd "/Users/keita_y/Desktop/Ant_Pro/" && g++ ABC167.c.cpp -o ABC167.c && "/Users/keita_y/Desktop/Ant_Pro/"ABC167.c
3 3 10
60 2 2 4
70 8 7 9
50 2 3 9
60
70
130
50
110
120
180
180
KYashima:Ant_Pro keita_y$ cd "/Users/keita_y/Desktop/Ant_Pro/" && g++ ABC167.c.cpp -o ABC167.c && "/Users/keita_y/Desktop/Ant_Pro/"ABC167.c
3 3 10
60 2 2 4
70 8 7 9
50 2 3 9
180
KYashima:Ant_Pro keita_y$ cd "/Users/keita_y/Desktop/Ant_Pro/" && g++ ABC167.c.cpp -o ABC167.c && "/Users/keita_y/Desktop/Ant_Pro/"ABC167.c
3 3 10
60 2 2 4
70 8 7 9
50 2 3 9
110
KYashima:Ant_Pro keita_y$ cd "/Users/keita_y/Desktop/Ant_Pro/" && g++ ABC167.c.cpp -o ABC167.c && "/Users/keita_y/Desktop/Ant_Pro/"ABC167.c
3 3 10
60 2 2 4
70 8 7 9
50 2 3 9
60
70
130
50
110
120
180
110
KYashima:Ant_Pro keita_y$ cd "/Users/keita_y/Desktop/Ant_Pro/" && g++ ABC167.c.cpp -o ABC167.c && "/Users/keita_y/Desktop/Ant_Pro/"ABC167.c
3 3 10
60 2 2 4
70 8 7 9
50 2 3 9
120
KYashima:Ant_Pro keita_y$ cd "/Users/keita_y/Desktop/Ant_Pro/" && g++ ABC167.c.cpp -o ABC167.c && "/Users/keita_y/Desktop/Ant_Pro/"ABC167.c
8 5 22
100 3 7 5 3 1
164 4 5 2 7 8
334 7 2 7 2 9
234 4 7 2 8 2
541 5 4 3 3 6
235 4 8 6 9 7
394 3 6 1 6 2
872 8 4 3 7 2
1067
KYashima:Ant_Pro keita_y$ 

Compiler output:
a.cc:1:9: error: found ':' in nested-name-specifier, expected '::'
    1 | KYashima:Ant_Pro keita_y$ cd "/Users/keita_y/Desktop/Ant_Pro/" && g++ ABC167.c.cpp -o ABC167.c && "/Users/keita_y/Desktop/Ant_Pro/"ABC167.c
      |         ^
      |         ::
a.cc:1:1: error: 'KYashima' does not name a type
    1 | KYashima:Ant_Pro keita_y$ cd "/Users/keita_y/Desktop/Ant_Pro/" && g++ ABC167.c.cpp -o ABC167.c && "/Users/keita_y/Desktop/Ant_Pro/"ABC167.c
      | ^~~~~~~~
Language: C++

#include <bits/stdc++.h>

#define gcd(m,n) __gcd(m,n)
#define lcm(m,n) m*(n/gcd(m,n))
#define fast std::ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pi acos(-1.0)
#define endl '\n'
#define MOD 1000000007
#define ull unsigned long long
#define ll long long
#define ld long double
#define pb push_back
#define dbg(x) cout << #x << "  " << x << endl;

ll power(ll base, ll exp) 
{ll res=1;while(exp>0) {if(exp%2==1) res=(res*base);base=(base*base);exp/=2;}return res;}

ll mod(ll a, ll b) {return (a % b + b) % b;}

ll powerm(ll base,ll exp,ll mod) 
{ll ans=1;while(exp){if(exp&1) ans=(ans*base)%mod;exp>>=1,base=(base*base)%mod;}return ans;}

using namespace std;


bool custom(pair<vector<ll>,ll>a, pair<vector<ll>,ll>b)
{
	vector<ll>v1 = a.first;
	vector<ll>v2 = b.first;
	for(ll i = 0; i < v1.size(); i++)
	{
		if(v1[i] => v2[i]) return true;
	}
	return false;
}
bool custom1(pair<vector<ll>,ll>a, pair<vector<ll>,ll>b)
{
	ll s1 = a.second;
	ll s2 = b.second;
	if(s1 => s2) return false;
	else return true;
}
int main() 
{	
	fast;
	ll n,m,x; cin>>n>>m>>x;
	vector<pair<vector<ll>,ll>>v;
	for(ll i = 0; i < n; i++)
	{
		ll c; cin>>c;
		v.push_back(make_pair(vector<ll>(),c));
		for(ll j = 0; j < m; j++)
		{
			ll t; cin>>t;
			v[i].first.push_back(t);
		}
	} 
	sort(v.begin(),v.end(),custom);
	ll arr[m];
	memset(arr,0,sizeof(arr));
//	cout << endl; 
ll ans = 0; ll flag = 0;
	for(ll i = 0; i < n; i++)
	{
		ans += v[i].second;
	//	cout << v[i].second << " ";
		for(ll j = 0; j < m; j++)
		{
	//		cout << v[i].first[j] << " ";
			arr[j] += v[i].first[j];
		}
	//	cout << endl;
		flag = 0;
		for(ll j = 0; j < m; j++)
		{
			if(arr[j] < x)
			{
				flag = 1;
				break;	
			}	
		}
		if(flag == 0) break;
	}  
	if(flag == 1) cout << -1 << endl; 
	else
	{
		ll ans1 = 0;
		sort(v.begin(),v.end(),custom1);
		memset(arr,0,sizeof(arr));
			for(ll i = 0; i < n; i++)
			{
			ans1 += v[i].second;
		//	cout << v[i].second << " ";
			for(ll j = 0; j < m; j++)
			{
		//		cout << v[i].first[j] << " ";
				arr[j] += v[i].first[j];
			}
		//	cout << endl;
			flag = 0;
			for(ll j = 0; j < m; j++)
			{
				if(arr[j] < x)
				{
					flag = 1;
					break;	
				}	
			}
			if(flag == 0) break;
			}  
		cout << min(ans,ans1) << endl;
	}
 	return 0;
}

Compiler output:
a.cc: In function 'bool custom(std::pair<std::vector<long long int>, long long int>, std::pair<std::vector<long long int>, long long int>)':
a.cc:32:27: error: expected primary-expression before '>' token
   32 |                 if(v1[i] => v2[i]) return true;
      |                           ^
a.cc: In function 'bool custom1(std::pair<std::vector<long long int>, long long int>, std::pair<std::vector<long long int>, long long int>)':
a.cc:40:16: error: expected primary-expression before '>' token
   40 |         if(s1 => s2) return false;
      |                ^
a.cc:39:12: warning: control reaches end of non-void function [-Wreturn-type]
   39 |         ll s2 = b.second;
      |            ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,m,x,min=INT_MAX,tempSum;
    cin>>n>>m>>x;
    vector<int> c(n),num(n);
    vector<vector<int>> a(n,vector<int>(m));

    for(int i=0;i<n;i++){
        cin>>c[i];
        for(int j=0;j<m;j++){
            cin>>a[i][j];
        }
    }
    for(int i=0;i<n;i++)num[i]=i;

    
    do{
        tempSum=0;
        vector<int> list(m,0);
        for(int ii=0;ii<n;ii++){
            tempSum+=c[num[ii]];
            for(int i=0;i<m;i++){
                list[i]+=a[num[ii]][i];
              	int flg=0;
            }
          for(int j=0;j<m;j++){
            		if(list[j]<x){
                		flg=1;
            		}
        		}
              	if(flg==0){
            		if(min>tempSum){
               	 		min=tempSum;
            		}
        		}
        }
    }while(next_permutation(num.begin(),num.end()));
    if(min==INT_MAX){
      cout<<-1<<endl;
    }else{
      cout<<min<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:33: error: 'flg' was not declared in this scope
   29 |                                 flg=1;
      |                                 ^~~
a.cc:32:20: error: 'flg' was not declared in this scope
   32 |                 if(flg==0){
      |                    ^~~
Language: C++

#include <iostream>
#include <random>
#include <algorithm>
using namespace std;

#define NM_MAX 12

class Book
{
private:
    unsigned int price;
    vector<int> progress;
    
public:
    unsigned int total_val;
    
    void set_price(unsigned int p){
        price = p;
    }
    
    void set_progress(vector<int> vec){
        progress = vec;
    }

    void calc_total_val(){
        total_val = accumulate(progress.begin(), progress.end(), 0);
    }

    unsigned int get_price(){
        return price;
    }
    unsigned int get_progress(unsigned int i){
        return progress[i];
    }

    bool operator<( const Book& right ) const {
        return total_val < right.total_val;
    }
};

class Takahashi
{
private:
    unsigned int progress[NM_MAX];

public:
    Takahashi(){
        memset(progress, 0, sizeof(unsigned int)*NM_MAX);
    }

};

int is_possible(vector<Book> books, unsigned int n, unsigned int m, unsigned int x){
    unsigned int i, j;

    vector<int> sum(m, 0);

    for( j=0; j < m; j++ ){
        unsigned int sum = 0;
        for ( i=0; i < n; i++){
            sum += books[i].get_progress(j);
        }
        //cout << sum << endl;
        if( sum < x ){
            //cout << sum << "," << x << endl;
            return -1;
        }
    }
    return 1;
}



int main(){
    unsigned int N, M, X;
    cin >> N >> M >> X;
    
    unsigned int i;
    vector<Book> books(N);
    for( i=0; i < N; i++){
        vector<int> vec(M+1);

        for (unsigned int j = 0; j < M+1; j++) {
            cin >> vec.at(j);
        }

        books[i].set_price(vec[0]);
        vec.erase(vec.begin());
        books[i].set_progress(vec);
        books[i].calc_total_val();
    }

    if( is_possible(books, N, M, X) == -1 ){
        cout << -1 << endl;
        return 0;
    }


    sort(books.begin(), books.end());
    vector<unsigned int> takahashi(M, 0);
    unsigned int total_fee = 0;
    for( i=0; i < N;i++){
        unsigned int j;
        for( j=0; j < M; j++){
            takahashi[j] += books[N-i-1].get_progress(j);
        }
        
        total_fee += books[N-i-1].get_price();

        bool flag = false;
        for( j=0; j < M; j++){
            if( takahashi[j] < X ){
                flag = true;
                break;
            }
        }
        if( flag == false) {
            break;
        }
    }
    cout << total_fee << endl;
    


    return 0;



}

Compiler output:
a.cc: In constructor 'Takahashi::Takahashi()':
a.cc:48:9: error: 'memset' was not declared in this scope
   48 |         memset(progress, 0, sizeof(unsigned int)*NM_MAX);
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
using namespace std;
using Graph=vector<vector<int>>;

int main(){
  int n,m,x; cin>>n>>m>>x;
  int c[n]; int a[n][m];
  rep(i,n){
    cin>>c[i];
    rep(j,m){
      cin>>a[i][j];
    }
  }
  int b[n];
  b[0]=1;
  rep1(i,n){
    b[i]=2*b[i-1];
  }
  int ans=1000000;
  for(int y=1;y<=5000){
    int r[m]={}; int money=0;
    rep(i,n){
      if(y^b[i]==1){
        money+=c[i];
        rep(j,m){
          r[j]+=a[i][j];
        }
      }
    }
    int f=1;
    rep(i,m){
      if(r[i]<x){
        f=0;
      }
    }
    if(f==1){
      ans=min(ans,money);
    }
  }
  if(ans==1000000){
    cout<<-1;
  }else{
    cout<<ans;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:22: error: expected ';' before ')' token
   31 |   for(int y=1;y<=5000){
      |                      ^
      |                      ;
Language: C++

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

int main() {
  int N ,M ,X,A;
  cin >> N >> M >> X; 
  vector<vector<int>> data(N, vector<int>(M));
 int facctorialMethod(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}
  int COM = 0;
  for(int t = 0;t < N; t++){
  COM += facctorialMethod(N)/facctorialMethod(t)/facctorialMethod(N-t);
  
  }
 }
 
  // 入力 (2重ループを用いる)
  for (int i = 0; i < N + 1; i++) {
    for (int j = 0; j < M + 1; j++) {
      cin >> data.at(i).at(j);
    }
  }
 if(data.at(i).at(1) >= X){
 
 }
for(int a = 0; a < COM ; a++){
 vector<int> T(COM); 
  
  for (int i = 0; i < N + 1; i++) {
    for (int j = 0; j < M + 1; j++) {
      if()
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: a function-definition is not allowed here before '{' token
    8 |  int facctorialMethod(int k){
      |                             ^
a.cc:18:10: error: 'facctorialMethod' was not declared in this scope
   18 |   COM += facctorialMethod(N)/facctorialMethod(t)/facctorialMethod(N-t);
      |          ^~~~~~~~~~~~~~~~
a.cc: At global scope:
a.cc:24:3: error: expected unqualified-id before 'for'
   24 |   for (int i = 0; i < N + 1; i++) {
      |   ^~~
a.cc:24:19: error: 'i' does not name a type
   24 |   for (int i = 0; i < N + 1; i++) {
      |                   ^
a.cc:24:30: error: 'i' does not name a type
   24 |   for (int i = 0; i < N + 1; i++) {
      |                              ^
a.cc:29:2: error: expected unqualified-id before 'if'
   29 |  if(data.at(i).at(1) >= X){
      |  ^~
a.cc:32:1: error: expected unqualified-id before 'for'
   32 | for(int a = 0; a < COM ; a++){
      | ^~~
a.cc:32:16: error: 'a' does not name a type
   32 | for(int a = 0; a < COM ; a++){
      |                ^
a.cc:32:26: error: 'a' does not name a type
   32 | for(int a = 0; a < COM ; a++){
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
template<class T,class U> inline bool chmin(T&x,U y){if(x>y){x=y;return true;}return false;}
template<class T,class U> inline bool chmax(T&x,U y){if(x<y){x=y;return true;}return false;}
#define fr(i,n) for(int i=0;i<(n);++i)
#define Fr(i,n) for(int i=1;i<=(n);++i)
#define ifr(i,n) for(int i=(n)-1;i>=0;--i)
#define iFr(i,n) for(int i=(n);i>0;--i)
 
int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
int n,m,x,b;
b= 0;
ll ans,y;
cin>>n>>m>>x;
vector<ll> vec(m+1);
vector<ll> keep(m+1);
ans=10000000;
ll no[n][m+1];
fr(i,n){
  fr(l,m+1){
    cin>>no[i][l];
  }
}
y=pow(2,n);
for (int bit = 0; bit < (1<<y); ++bit){
b=1;
vec = keep;
fr(i,n){
if (bit & (1<<i)){
fr(l,m+1){
vec[l] += no[i][l];
}
}
}
Fr(i,m){
if(vec[i] < x){
b = 0;
}
}
if(b==1){
ans = min(ans,vec[0]);
}
}
if(ans==10000000){
cout<<-1;
}
else{
cout<<ans<<;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:12: error: expected primary-expression before ';' token
   51 | cout<<ans<<;
      |            ^
Language: C++

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

int main() {
  int N,M,X;
  cin >> N >> M >> X;
  vector<int> C(N),;
  vector<vector<int>> A(N,vector<int>(M))
  for (int i=0; i<N; i++) {
    cin >> C.at(i);
    for (int j=0; j<M; j++) {
      cin >> A.at(i).at(j);
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected unqualified-id before ';' token
    7 |   vector<int> C(N),;
      |                    ^
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for (int i=0; i<N; i++) {
      |   ^~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 |   for (int i=0; i<N; i++) {
      |                 ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

const int INF = 987654231;

int N, M, X;
vector<int> cost;
vector<vector<int>> vec;
int solve(int current, vector<int> &A)
{
	if (current >= N) {
		for (int i = 0; i < M; i++)
			if (A[i] < X)
				return INF;
		return 0;
	}

	vector<int> B = A;
	for (int i = 0; i < M; i++)
		B[i] += vec[current][i];

	int ret = min(solve(current + 1, A), solve(current + 1, B) + cost[current]);
	return ret;
}

int main(void)
{
	cin >> N >> M >> X;

	cost = vector<int>(N);
	vec = vector<vector<int>>(N, vector<int>(M));
	for (int i = 0; i < N; i++)
	{
		cin >> cost[i];
		for (int j = 0; j < M; j++)
			cin >> vec[i][j];
	}

	int ret = solve(0, vector<int>(N, 0));
	if (ret == INF)
		cout << -1 << endl;
	else
		cout << ret << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:28: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
   42 |         int ret = solve(0, vector<int>(N, 0));
      |                            ^~~~~~~~~~~~~~~~~
a.cc:12:37: note:   initializing argument 2 of 'int solve(int, std::vector<int>&)'
   12 | int solve(int current, vector<int> &A)
      |                        ~~~~~~~~~~~~~^
Language: Java

import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner scan;
        int N;
        int M;
        int X;
        int Na;
        int Nb;
        int Nc;
        int score;

        scan = new Scanner(System.in);
        N = scan.nextInt();
        M = scan.nextInt();
        X = scan.nextInt();

        for(int count =0; count > N ;count ++){
            Na = scan.nextInt();
            for (int num =0; num>M; num ++){
                scan = new Scanner(System.in);
                score = scan.nextInt();
                Nb = Nb + score;
                if (Nb <= X) {
                    Nc = Nc + Na;
                }else{
                }
            }
            
        }
        System.out.println(Nc);
    }

}

Compiler output:
Main.java:24: error: variable Nb might not have been initialized
                Nb = Nb + score;
                     ^
Main.java:26: error: variable Nc might not have been initialized
                    Nc = Nc + Na;
                         ^
Main.java:32: error: variable Nc might not have been initialized
        System.out.println(Nc);
                           ^
3 errors
Language: C++

#include <iostream>
#include <cstring>
#include <algorithm>
#include<vector>
using namespace std;
using ll = long long;
ll N, M, X;

int main() {
    cin >> N >> M >> X;
    vector<ll> value(N);
    vector<vector<ll>> v(N);
    
    ll ans = INT_MAX - 10;
    bool flag = false;
    for (ll i = 0;i < N;i++) {
        cin >> value[i];
        for (ll j = 0;j < M;j++) {
            ll a = 0;
            cin >> a;
            v[i].push_back(a);
        }
    }
    for (int bit = 0; bit < (1 << N); ++bit)
    {
        vector<ll> vSum(N);
        ll sum = 0;
        for (ll i = 0; i < N; ++i) {
            if (bit & (1 << i)) { // i が bit に入るかどうか
                for (ll j = 0;j < M;j++) {
                    vSum[j] += v[i][j];
                }
                sum += value[i];
            }
        }
        bool overflag = true;
        for (ll k = 0;k < M;k++) {
            if (vSum[k] < X) {
                overflag = false;
            }
        }
        if((overflag)&&(sum<ans)) {
            ans = sum;
            flag = true;
        }
    }
    if (flag) {
        cout << ans << endl;
    }
    else {
        cout << -1 << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: 'INT_MAX' was not declared in this scope
   14 |     ll ans = INT_MAX - 10;
      |              ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include<vector>
  +++ |+#include <climits>
    5 | using namespace std;
Language: C++

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

int main() {
  int N, M, X; cin >> N >> M >> X;
  vector<int> C(N);
  vector<vector<int>> A(N, vector<int(M));
  for (int i=0; i<N; i++) {
    int c; cin >> c; C[i]=c;
    for (int j=0; j<M; j++) {
      int a; cin >> a; A.at(i).at(j)=a;
    }
  }
  
  //whether all are over X
  vector<int> sum(M);
  for (int i=0; i<M; i++) {
    for (int j=0; j<N; j++) {
      sum[i]+=A.at(j).at(i);
    }
  }
  bool w=true;
  while (w) {
    for (int i=0; i<M; i++) {
      if (sum[i]<X) {
        cout << -1 << endl;
        w=false;
      }
    }
  }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:40: error: the value of 'M' is not usable in a constant expression
    7 |   vector<vector<int>> A(N, vector<int(M));
      |                                        ^
a.cc:5:10: note: 'int M' is not const
    5 |   int N, M, X; cin >> N >> M >> X;
      |          ^
a.cc:7:40: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
    7 |   vector<vector<int>> A(N, vector<int(M));
      |                                        ^
a.cc:7:40: note:   expected a type, got 'M'
a.cc:7:40: error: template argument 2 is invalid
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <ctime>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cassert>
#include <bitset>
#include <list>
#include <cstdio>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <cmath>
#include <tuple>
#include <cassert>
#include <array>
#include <iomanip>

using namespace std;
using ll = long long;
using pii = pair<int, int>;
using ti = tuple<int, int, int>;

const double eps=1e-14;
const int mod = 1e9 + 7;
const int inf = ((1<<28));
const ll linf = (1LL<<58);

#define int long long

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, m, x;
    cin >> n >> m >> x;
    int A[n][m], C[n];
    int ans = inf;
    bool ok = false;
    for(int i=0; i<n; i++)
    {
      cin >> C[i];
      for(int j=0; j<m; j++)
      {
        cin >> A[i][j];
      }
    }
    for(int bit = 0; bit<(1<<n); ++bit)
    {
      int cap[n];
      int sumC = 0;
      for(int i=0; i<n; i++) cap[i] = 0;
      for(int i=0; i<n; i++)
      {
        if(bit & (1<<i))
        {
          sumC += C[i];
          for(int j=0; j<m; j++) cap[j] += A[i][j];
        }
      }
      bool ok2 = true;
      for(int i=0; i<m; i++) if(cap[i]<x) ok2 = false; 
      if(ok2)
      {
        ans = min(ans, sumC);
        ok = true;
      }
    }
    if(ok) cout << ans << endl;
    else cout << -1 << endl;
    return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: Java

import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner scan;
        int N;
        int M;
        int X;
        int Na;
        int Nb;
        int Nc;
        int score;

        scan = new Scanner(System.in);
        N = scan.nextInt();
        M = scan.nextInt();
        X = scan.nextInt();

        for(int count =0; count > N ;count ++){
            Na = scan.nextInt();
            for (int num =0; num>M; num ++){
                scan = new Scanner(System.in);
                score = scan.nextInt();
                Nb = Nb + score;
                if (scoreSum <= X) {
                    Nc = Nc + Na;
                }else{
                }
            }
            
        }
        System.out.println(Nc);
    }

}

Compiler output:
Main.java:25: error: cannot find symbol
                if (scoreSum <= X) {
                    ^
  symbol:   variable scoreSum
  location: class Main
1 error
Language: Java

import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner scan;
        int N;
        int M;
        int X;
        int Na;
        int score;

        scan = new Scanner(System.in);
        N = scan.nextInt();
        M = scan.nextInt();
        X = scan.nextInt();

        for(int count =0; count > N ;count ++){
            Na = scan.nextInt();
            for (int num =0; num>M; num ++){
                scan = new Scanner(System.in);
                score = scan.nextInt();
                int scoreSum = scoreSum + score;
                if (scoreSum <= X) {
                    int yenSum = yenSum + Na;
                }else{
                }
            }
            System.out.println(yenSum);
        }
    }

}

Compiler output:
Main.java:28: error: cannot find symbol
            System.out.println(yenSum);
                               ^
  symbol:   variable yenSum
  location: class Main
1 error
Language: Java

import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner scan;
        int N;
        int M;
        int X;
        int Na;
        int score;

        scan = new Scanner(System.in);
        N = scan.nextInt();
        M = scan.nextInt();
        X = scan.nextInt();

        for(int count =0; count > N ;count ++){
            Na = scan.nextInt();
            for (int num =0; num>M; num ++){
                scan = new Scanner(System.in);
                score = scan.nextInt();
                int scoreSum = scoreSum + score;
                if (scoreSum <= X) {
                    int yenSum = yenSum + Na;
                }else{
                }

            }
        }
        System.out.println(yenSum);
    }

}

Compiler output:
Main.java:30: error: cannot find symbol
        System.out.println(yenSum);
                           ^
  symbol:   variable yenSum
  location: class Main
1 error
Language: Java

import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner scan;
        int N;
        int M;
        int X;
        int Na;
        int yenSum;
        int scoreSum;
        int score;

        scan = new Scanner(System.in);
        N = scan.nextInt();
        M = scan.nextInt();
        X = scan.nextInt();

        for(int count =0; count > N ;count ++){
            Na = scan.nextInt();
            for (int num =0; num>M; num ++){
                scan = new Scanner(System.in);
                score = scan.nextInt();
                scoreSum = scoreSum + score;
                if (scoreSum <= X) {
                    yenSum = yenSum + Na;
                }else{
                }

            }
        }
        System.out.println(yenSum);
    }

}

Compiler output:
Main.java:24: error: variable scoreSum might not have been initialized
                scoreSum = scoreSum + score;
                           ^
Main.java:26: error: variable yenSum might not have been initialized
                    yenSum = yenSum + Na;
                             ^
Main.java:32: error: variable yenSum might not have been initialized
        System.out.println(yenSum);
                           ^
3 errors