criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;
static class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int x=sc.nextInt();
    int[] c=new int[n]; 
    int[][] a=new int [n][m]; 
    for(int i=0;i<n;i++){
      c[i]=sc.nextInt();
      for(int j=0;j<n;j++){
        a[i][j]=sc.nextInt();
      }
    }
    int[] aExp=new int[m];
    int cSum=0;
    List<Integer> cList=new ArrayList<>();
    boolean masterd=true;
    sc.close();
    
    for(int i=0;i< 1<<n;i++){
      for(int j=0;j<n;j++){
        if((1&i>>j)==1){
          for(int k=0;k<m;k++){
            aExp[k]+=a[j][k];
          }
          cSum+=c[j]
        }
      }
      for(int k=0;k<m;k++){
        if(aExp[k]<x){
          masterd=false;
          break;
        }
      }
      if(masterd) cList.add(cSum);
      for(int k=0;k<m;k++) aExp[k]=0;
      cSum=0;
      masterd=true;
    }
    int cMin=Integer.MAX_VALUE;
    if(cList.isEmpty()){
      cMin=-1;
    }
    else{
      for(int z:cList){
        if(z<cMin) z=cMin;
      }
    }
    System.out.println(cMin);
  }
}

Compiler output:
Main.java:28: error: ';' expected
          cSum+=c[j]
                    ^
1 error
Language: C++

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

# define ll long long 
# define VI vector<int>
# define VL vector<ll>
# define PII pair<int,int> 
# define VII vector<PII>
# define mp make_pair
# define pb push_back
# define vt vector
# define PI acos(-1)
# define ld long double
# define endl "\n"
# define all(c) (c).begin(), (c).end()
# define ft first 
# define sd second 
# define FOR(i,a,b) for(int i = a ; i < b ; ++i) 
# define F0R(i,b) for(int i = 0 ; i < b ; ++i) 
# define RF0R(i,b) for(int i = b ; i >= 0 ; --i) 
const ll inf = 1e18 ; 
const int MxN = 100001 ; 

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL) ; 
	
	int n , m , x; 
	cin >> n >> m >> x ; 
	vt<int> c(n) ; 
	vt<vt<int>> A(n,vt<int>(m)) ; 
	
	F0R(i,n) {
		cin >> c[i] ; 
		F0R(j,n) 
			cin >> A[i][j] ; 
	}
	int ans = INT_MAX ; 
	F0R(i,(1<<n)) {
		int cost = 0 ; 
		vt<int> skills(m) ; 
		F0R(j,n) {
			if((i>>j)&1) {
				//cout << 1 ; 
				F0R(k,m)
					skills[k] += A[j][k] ; 
				cost += c[j] ;
			} else 
			//cout <<0;
		} 
		//cout << endl ; 
		bool ok = true ;
		F0R(j,m) {
			if(skills[j] < x) {
				ok = false ;
				break ;
			}
		}
		if(ok) {
			ans = min(ans , cost ) ; 
		}
	}
	if(ans == INT_MAX) 
		cout << -1 ; 
	else 
		cout << ans; 
	return 0 ; 
}




Compiler output:
a.cc: In function 'int main()':
a.cc:51:17: error: expected primary-expression before '}' token
   51 |                 }
      |                 ^
Language: C++

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

struct node
{
	int c;
	int a[15]; 
}book[15];

int main()
{
	int n,m,x;
	cin>>n>>m>>x;
	for(int i=0;i<n;i++)
	{
		cin>>book[i].c;
		for(int j=0;j<m;j++) cin>>book[i].a[j];
	}
	int ans=2e9;
	for(int i=0;i<(1<<n);i++)
	{
		memset(b,0,sizeof b);
		int sum=0;
		for(int j=0;j<n;j++)
		{
			if(i>>j&1)
			{
				sum+=book[j].c;
				for(int k=0;k<m;k++) b[k]+=book[j].a[k];
			}
			bool flag=1;
			for(int j=0;j<m;j++) if(b[j]<x) flag=0;
			if(flag) ans=min(ans,sum);
		}
		if(ans==2e9) cout<<"-1";
		else cout<<ans;
		return 0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:24: error: 'b' was not declared in this scope
   24 |                 memset(b,0,sizeof b);
      |                        ^
Language: C++

#include<iostream>    //C
#include<cstdio>
#include<map>
#include<string>
#include<list>
#include<vector>
#include<cstring>
#include<algorithm>
#include<queue>
#include<deque>
#include<cmath>
#include<set>
#include<functional>
using namespace std; 
typedef long long  ll;
const ll maxn=1e5+5;
int n,m,x;
int a[15][15];
struct node{
	int id;
	int mon;
	bool operator<(node &other)const{
		return mon>other.mon;
	}
}c[15];
int sum[15],cnt=0;
void slove(){
	int flag=0;
	for(int i=1;i<=n;i++){
		int b=c[i].id;
		//cout<<"mon: "<<c[i].mon<<endl;
		bool p=check(b);
		for(int j=1;j<=m;j++){
			//cout<<sum[j]<<" ";
			if(sum[j]<x) { flag=2;break;}
			if(sum[j]-a[b][j]>=x){
				flag=1;
			}
			else {flag=0;break;	}
		}
		//cout<<"cnt: "<<cnt<<endl;
		if(flag==1) {
		    for(int j=1;j<=m;j++) sum[j]=sum[j]-a[b][j];
		    cnt-=c[i].mon;
		}
		if(flag==2) { printf("-1\n");break;}
	}
	if(flag!=2) cout<<cnt<<endl; 
}
int main(){
	cin>>n>>m>>x;
	for(int i=1;i<=n;i++){
		cin>>c[i].mon;
		c[i].id=i;
		cnt+=c[i].mon;
		for(int j=1;j<=m;j++){
			cin>>a[i][j];
			sum[j]+=a[i][j];
		}
	}
	sort(c+1,c+n+1);
	slove();
	return 0;
}

Compiler output:
a.cc: In function 'void slove()':
a.cc:32:24: error: 'check' was not declared in this scope
   32 |                 bool p=check(b);
      |                        ^~~~~
Language: C++

#include <bits/stdc++.h> //全てのヘッダファイルをインクルード
 
//ループ
#define rep(i, n) for(int i = 0; i < (n); i++) //普通のループ
#define repr(i, n) for(int i = n; i >= 0; i--) //逆ループ
 
//型名省略
typedef long long ll;
//値
static const ll MX = 100005;
static const ll MX_ll = 1e18;
const double PI = acos(-1); //π
 
using namespace std;
 
//ソート
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
 
//#include "./lib/generic/search.h"

//文字列入力した小数値を小数点なくして返す
int changeDoubleToInt(string decimal){ 
    decimal.erase(1, 1); //小数点削除
    int n_decimal = atoi(decimal.c_str()); //c_strでchar*に変換後、atoiでintに変換
    return n_decimal;
}

int main(){
    int n, m, x;
    cin >> n >> m >> x;
    int c[n], a[n][m];
    rep(i, n){
        cin >> c[i];
        rep(j, m){
            cin >> a[i][j];
        }
    }
    int ans = 1001001001;

    rep(s, 1<<n){ //sは0-nの値まで1bitずつ数が増えていく(<<で1ビットずつビットシフトしているため)
        int cost = 0;
        vactor<int> d(m);
        rep(i, n){ 
            if(s>>i&1) // sのibit=1のとき＝i番目の本を選ぶことになる
                cost += c[i]; //costを求める
                rep(j,m) d[j] += a[i][j];
        }

        bool ok = true;
        rep(j,m) if(d[j] < x) ok = false; //xを超えないものがあったらNGとする
        if(ok) ans = min(ans, cost);
    }

    if(ans==1001001001) cout << -1 << endl;
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:9: error: 'vactor' was not declared in this scope
   42 |         vactor<int> d(m);
      |         ^~~~~~
a.cc:42:16: error: expected primary-expression before 'int'
   42 |         vactor<int> d(m);
      |                ^~~
a.cc:46:26: error: 'd' was not declared in this scope
   46 |                 rep(j,m) d[j] += a[i][j];
      |                          ^
a.cc:50:21: error: 'd' was not declared in this scope
   50 |         rep(j,m) if(d[j] < x) ok = false; //xを超えないものがあったらNGとする
      |                     ^
Language: C

#include <bits/stdc++.h>
using namespace std;
int main(void){
  
  int n,m,x,i,j;
  cin >> n >> m >> x;
  vector <vector<int> > a(n, vector<int>(m));
  vector <int> ans(12,0);
  int c[12];
  int money = 0,d=0;
  bool isOK = true;
  int count = 0;

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

  int k;
  
  for(i=0;i<loop;i++){

    for(j=0;j<n;j++){
     if(i >> j & 1){ 
       for(k=0;k<m;k++){
      	ans[k] += a[j][k];
       }
      d += c[j];
     }
    }
    for(j=0;j<m;j++){
     if(ans[j] < x){
       isOK = false; 
     }
    }
    if(! isOK) count++;
    
    if(isOK == true & money > d){
     money = d;
    }
    isOK = true;
    d = 0;
    
    for(j=0;j<m;j++){
     ans[j] = 0; 
    }
  }
  
  if (count == loop){
    cout << -1;
    return 0;
  }
  cout <<  money;
  return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
long main(){
    long n,m,x;
    cin>>n>>m>>x;
    vector<pair<long,vector<long>>> a(n);
    for(long i=0;i<n;i++){
        cin>>a[i].first;
        vector<long> temp(m);
        for (long long j=0;j<m;j++)cin>>temp[j];
        a[i].second=temp;
    }
    sort(a.rbegin(),a.rend());
    vector<long> sum(m,0);
    long res=0;
    for(long i=0;i<n;i++){
        for(long j=0;j<m;j++)sum[j]+=a[i].second[j];
        res+=a[i].first;
    }
    bool ok=true;
    for(long j=0;j<m;j++){
        ok = ok && (x<=sum[j]);
    }
    if(ok){
        for(long i=0;i<n;i++){
            bool flag=true;
            for(long j=0;j<m;j++){
                flag=flag && (x<=(sum[j]-a[i].second[j]));
            }
            if(flag){
                res-=a[i].first;
                for(long j=0;j<m;j++){
                    sum[j]-=a[i].second[j];
                }
            }
        }
    }else{
        res=-1;
    }
    cout<<res;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
long main(){
    long n,m,x;
    cin>>n>>m>>x;
    vector<pair<long,vector<long>>> a(n);
    for(long i=0;i<n;ilong
        cin>>a[i].first;
        vector<long> temp(m);
        for (long long j=0;j<m;j++)cin>>temp[j];
        a[i].second=temp;
    }
    sort(a.rbegin(),a.rend());
    vector<long> sum(m,0);
    long res=0;
    for(long i=0;i<n;i++){
        for(long j=0;j<m;j++)sum[j]+=a[i].second[j];
        res+=a[i].first;
    }
    bool ok=true;
    for(long j=0;j<m;j++){
        ok = ok && (x<=sum[j]);
    }
    if(ok){
        for(long i=0;i<n;i++){
            bool flag=true;
            for(long j=0;j<m;j++){
                flag=flag && (x<=(sum[j]-a[i].second[j]));
            }
            if(flag){
                res-=a[i].first;
                for(long j=0;j<m;j++){
                    sum[j]-=a[i].second[j];
                }
            }
        }
    }else{
        res=-1;
    }
    cout<<res;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:8:22: error: 'ilong' was not declared in this scope; did you mean 'ulong'?
    8 |     for(long i=0;i<n;ilong
      |                      ^~~~~
      |                      ulong
a.cc:8:27: error: expected ')' before 'cin'
    8 |     for(long i=0;i<n;ilong
      |        ~                  ^
      |                           )
    9 |         cin>>a[i].first;
      |         ~~~                
a.cc:12:11: error: 'i' was not declared in this scope
   12 |         a[i].second=temp;
      |           ^
a.cc: At global scope:
a.cc:14:9: error: expected constructor, destructor, or type conversion before '(' token
   14 |     sort(a.rbegin(),a.rend());
      |         ^
a.cc:15:22: error: 'm' was not declared in this scope; did you mean 'tm'?
   15 |     vector<long> sum(m,0);
      |                      ^
      |                      tm
a.cc:17:5: error: expected unqualified-id before 'for'
   17 |     for(long i=0;i<n;i++){
      |     ^~~
a.cc:17:18: error: 'i' does not name a type
   17 |     for(long i=0;i<n;i++){
      |                  ^
a.cc:17:22: error: 'i' does not name a type
   17 |     for(long i=0;i<n;i++){
      |                      ^
a.cc:22:5: error: expected unqualified-id before 'for'
   22 |     for(long j=0;j<m;j++){
      |     ^~~
a.cc:22:18: error: 'j' does not name a type
   22 |     for(long j=0;j<m;j++){
      |                  ^
a.cc:22:22: error: 'j' does not name a type
   22 |     for(long j=0;j<m;j++){
      |                      ^
a.cc:25:5: error: expected unqualified-id before 'if'
   25 |     if(ok){
      |     ^~
a.cc:38:6: error: expected unqualified-id before 'else'
   38 |     }else{
      |      ^~~~
a.cc:41:5: error: 'cout' does not name a type
   41 |     cout<<res;
      |     ^~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: Java

import java.io.*;
import java.util.*;
public class C {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n,m,x;
		n = s.nextInt();
		m = s.nextInt();
		x = s.nextInt();
		int [][] cost = new int[n][m+1];
		for(int i=0;i<cost.length;i++) {
			for(int j=0;j<m+1;j++) {
				cost[i][j] = s.nextInt();
			}
		}
		int global_min = Integer.MAX_VALUE;
		
		for(int mask = 0; mask<1<<n; mask++) {
			int [] understanding = new int[m];
			int sum = 0;
			for(int i=0;i<cost.length;i++) {
				int bit = 1<<i;
				if((mask & bit)!=0) {
					sum+=cost[i][0];
					for(int j=0;j<m;j++) {
						understanding[j] += cost[i][j+1];
					}
				}
			}
			boolean flag = true;
			for(int a:understanding) {
				if(a<x) {
					flag = false;
				}
			}
			if(flag) {
				global_min = Math.min(global_min, sum);
			}
		}
		if(global_min==Integer.MAX_VALUE) {
			System.out.println(-1);
		}
		else {
		System.out.println(global_min);
		}

	}

}


Compiler output:
Main.java:3: error: class C is public, should be declared in a file named C.java
public class C {
       ^
1 error
Language: C

/* C - Skill Up */

#include <stdio.h>

int main(void){
  int N, M, X, ans = 1e9;
  scanf("%d %d %d", &N, &M, &X);
  int C[N], A[N][M];
  for(int i = 0; i < N; i++){
    scanf("%d", &C[i]);
    for(int j = 0; j < M; j++){
      scanf("%d", &A[i][j]);
    }
  }
  /* bit全探索 */
  for(int bit = 0; bit < (1 << N); bit++){
    int money = 0, totalA[M]; // 可変長配列は = {} で初期化できない
    // 以下のように配列を初期化
    for(int j = 0; j < M; j++){
      totalA[j] = 0;
    }
    for(int i = 0; i < N; i++){
      if(bit & (1 << i)){
        money += C[i];
        for(int j = 0; j < M; j++){
          totalA[j] += A[i][j];
        }
      }
    }
    bool judge = true;
    for(int j = 0; j < M; j++){
      if(totalA[j] < X){
        judge = false;
        break;
      }
    }
    if(judge == 1 && money < ans){
      ans = money;
    }
  }
  if(ans == 1e9){
    puts("-1");
  }else{
    printf("%d\n", ans);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:30:5: error: unknown type name 'bool'
   30 |     bool judge = true;
      |     ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    4 | 
main.c:30:18: error: 'true' undeclared (first use in this function)
   30 |     bool judge = true;
      |                  ^~~~
main.c:30:18: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:30:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:33:17: error: 'false' undeclared (first use in this function)
   33 |         judge = false;
      |                 ^~~~~
main.c:33:17: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

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

int main() {
  int N,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);
    }
  }
  int ans=10000000;
  for (int tmp = 0; tmp < (1 << N); tmp++) {
    bitset<12> s(tmp);
    bool b=true;
    for(int i=1;i<M+1;i++){
      int a=0;
      for(j=0;j<N;j++){
        if(s&(1 << j)!=0){
          a+=data.at(j).at(i);
        }
      }
      if(a<X) b=false;
    }
    if(b){
      int x=0;
      for(j=0;j<N;j++){
        if(s&(1<<j)!=0) x+=data.at(j).at(0);
      }
      ans=min(ans,x);
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: 'j' was not declared in this scope
   18 |       for(j=0;j<N;j++){
      |           ^
a.cc:27:11: error: 'j' was not declared in this scope
   27 |       for(j=0;j<N;j++){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
ll INF=1LL<<60;

int a[12][12];
int main() {
	int n,m,x; cin >> n >> m >> x;
	vint c(n);
	rep(i,n) {
		cin >> c[i];
		rep(j,m) cin >> a[i][j];
	}
	ll ans=INF;
	rep(s,1<<n) {
		int cost = 0;
		vint d(m);
		rep(i,n) {
			if(s>>i&i) {
				cost+=c[i];
				rep(j,m) d[j]+=a[i][j];
			}
		}
		bool ok = true;
		rep(j,m) if(d[j]<x) ok = false;
		if(ok) ans=min(ans,cost);
	}
	if(ans==INF) cout << -1 << endl;
	else cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:31: error: no matching function for call to 'min(ll&, int&)'
   28 |                 if(ok) ans=min(ans,cost);
      |                            ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:28:31: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   28 |                 if(ok) ans=min(ans,cost);
      |                            ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:28:31: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   28 |                 if(ok) ans=min(ans,cost);
      |                            ~~~^~~~~~~~~~
Language: C++

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

int a[12][12];
int main() {
	int n,m,x; cin >> n >> m >> x;
	vint c(n);
	rep(i,n) {
		cin >> c[i];
		rep(j,m) cin >> a[i][j];
	}
	ll ans=INF;
	rep(s,1<<n) {
		int cost = 0;
		vint d(m);
		rep(i,n) {
			if(s>>i&i) {
				cost+=c[i];
				rep(j,m) d[j]+=a[i][j];
			}
		}
		bool ok = true;
		rep(j,m) if(d[j]<x) ok = false;
		if(ok) ans=min(ans,cost);
	}
	if(ans==INF) cout << -1 << endl;
	else cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: 'INF' was not declared in this scope
   15 |         ll ans=INF;
      |                ^~~
a.cc:27:31: error: no matching function for call to 'min(ll&, int&)'
   27 |                 if(ok) ans=min(ans,cost);
      |                            ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:27:31: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   27 |                 if(ok) ans=min(ans,cost);
      |                            ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:27:31: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   27 |                 if(ok) ans=min(ans,cost);
      |                            ~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
typedef long long ll;
using namespace std;
int a[12][12];
const int INF = 1001001001;
int main(){	
	int n,m,x;
	cin >> n >> m >> x;
	vector<int> c(n);
	rep(i,n){
		cin >> c[i];
		rep(j,m) cin >> a[i][j];
	}
	int ans = INF;
	rep(s,1<<n){
		int cost=0;
		vector<int> d(m);
		rep(i,n){
			if(s>>i&1){
				cost += c[i];
				rep(j,m) d[j] += a[i][j];
			}
		}
		bool ok = true;
		rep(i,m) if(d[j] < x) ok = false;
		if(ok) ans = min(ans, cost);
	}
	if(ans == INF) cout << -1 << endl;
	else cout << ans << endl;
	return 0;

}




Compiler output:
a.cc: In function 'int main()':
a.cc:26:31: error: 'j' was not declared in this scope
   26 |                 rep(i,m) if(d[j] < x) ok = false;
      |                               ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
typedef long long ll;
using namespace std;
int a[12][12];
const int INF = 1001001001;
int main(){	
	int n,m,x;
	cin >> n >> m >> x;
	vecotr<int> c(n);
	rep(i,n){
		cin >> c[i];
		rep(j,m) cin >> a[i][j];
	}
	int ans = INF;
	rep(s,1<<n){
		int cost=0;
		vector<int> d(m);
		rep(i,n){
			if(s>>i&1){
				cost += c[i];
				rep(j,m) d[j] += a[i][j];
			}
		}
		bool ok = true;
		rep(i,m) if(d[j] < x) ok = false;
		if(ok) ans = min(ans, cost);
	}
	if(ans == INF) cout << -1 << endl;
	else cout << ans << endl;
	return 0;

}




Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'vecotr' was not declared in this scope
   10 |         vecotr<int> c(n);
      |         ^~~~~~
a.cc:10:16: error: expected primary-expression before 'int'
   10 |         vecotr<int> c(n);
      |                ^~~
a.cc:12:24: error: 'c' was not declared in this scope
   12 |                 cin >> c[i];
      |                        ^
a.cc:21:41: error: 'c' was not declared in this scope
   21 |                                 cost += c[i];
      |                                         ^
a.cc:26:31: error: 'j' was not declared in this scope
   26 |                 rep(i,m) if(d[j] < x) ok = false;
      |                               ^
Language: C++

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

// ProblemSet: Skill up
void solve() {
	int n , m , x;
	cin >> n >> m >>x;

	 vector<vector<int>>arr(n , vector<int>(m));
	 vector<int>yen(n);

	 for(int i =0; i<n; i++){
			cin >> yen[i];
			for(int j = 0; j < m; j++){
					cin >> arr[i][j];
				}
		}

	bool ok;
	int ans=12345678;
	int all =1<<n;

	 for(int mask=0; mask<all; mask++){
			vector<int>level_by_level;
			int cost =0;
			for(int i =0; i<n; i++){

				if((mask>>i)&1){
						cost +=yen[i];
						for(int j = 0; j<m; j++){
								level_by_level[j] += arr[i][j];
						}
					}
				}



				for(int j =0; j<m; j++){
		if(level_by_level[j] < x)
		ok = false;
		}
	if(ok){
			ans = min(ans, cost)
		}

		}

		if(ans = 12345678) cout << -1 <<endl;
		else cout << ans << endl;

}

int main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());
/**
    int t;
    cin >> t;
    while(t--) {
      solve();
    }
**/
solve();
return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:44:45: error: expected ';' before '}' token
   44 |                         ans = min(ans, cost)
      |                                             ^
      |                                             ;
   45 |                 }
      |                 ~
Language: C++

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

// ProblemSet: Skill up
void solve() {
	int n , m , x;
	cin >> n >> m >>x;

	 vector<vector<int>>arr(n , vector<int>(m));
	 vector<int>yen(n);

	 for(int i =0; i<n; i++){
			cin >> yen[i];
			for(int j = 0; j < m; j++){
					cin >> arr[i][j];
				}
		}

	bool ok;
	int ans=12345678;
	int all =1<<n;

	 for(int mask=0; mask<all; mask++){
			vector<int>level_by_level;
			for(int i =0; i<n; i++){
				int cost =0;
				if((mask>>i)&1){
						cost +=yen[i];
						for(int j = 0; j<m; j++){
								level_by_level[j] += arr[i][j];
						}
					}
				}



				for(int j =0; j<m; j++){
		if(level_by_level[j] < x)
		ok = false;
		}
	if(ok){
			ans = min(ans, cost)
		}

		}

		if(ans = 12345678) cout << -1 <<endl;
		else cout << ans << endl;

}

int main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());
/**
    int t;
    cin >> t;
    while(t--) {
      solve();
    }
**/
solve();
return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:43:40: error: 'cost' was not declared in this scope; did you mean 'cosl'?
   43 |                         ans = min(ans, cost)
      |                                        ^~~~
      |                                        cosl
Language: C++

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

// ProblemSet: Skill up
void solve() {
	int n , m , x;
	cin >> n >> m >>x;

	 vector<vector<int>>arr(n , vector<int>(m));
	 vector<int>yen(n);

	 for(int i =0; i<n; i++){
			cin >> yen[i];
			for(int j = 0; j < m; j++){
					cin >> arr[i][j];
				}
		}

	bool ok;
	int ans=12345678;
	int all =1<<n;

	 for(int mask-0; mask<all; mask++){
			vector<int>level_by_level;
			for(int i =0; i<n; i++){
				int cost =0;
				if((mask>>i)&1){
						cost +=yen[i];
						for(int j = 0; j<m; j++){
								level_by_level[j] += arr[i][j];
						}
					}
				}



				for(int j =0; j<m; j++){
		if(level_by_level[j] < x)
		ok = false;
		}
	if(ok){
			ans = min(ans, cost)
		}

		}

		if(ans = 12345678) cout << -1 <<endl;
		else cout << ans << endl;

}

int main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());
solve();
return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:24:22: error: expected ';' before '-' token
   24 |          for(int mask-0; mask<all; mask++){
      |                      ^
      |                      ;
a.cc:24:34: error: expected ')' before ';' token
   24 |          for(int mask-0; mask<all; mask++){
      |             ~                    ^
      |                                  )
a.cc:24:36: error: 'mask' was not declared in this scope; did you mean 'std::filesystem::perms::mask'?
   24 |          for(int mask-0; mask<all; mask++){
      |                                    ^~~~
      |                                    std::filesystem::perms::mask
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:162:7: note: 'std::filesystem::perms::mask' declared here
  162 |       mask              = 07777,
      |       ^~~~
Language: C++

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

const int INF = 1001001001;
    

int main() {
  int N,M,X;
  cin>>N>>M>>X;
  vector<vector<int>> a(N, vector<int>(M));
  vector<int> c(N);
  
  for(int i=0;i<N;i++){
    cin>>c.at(i);
    for(int j=0;j<M;j++){
      cin>>a.at(i).at(j);
    }
  }
  int ans=INF;
  for(int s=0;s<(1<<N);s++){
    bitset<12> d(s);
    vector<int> skill(M);
    int cost=0;
    for (int i = 0; i < N; i++) {
      if (d.test(i)) {
        cost+=c.at(i);
        for(int j=0;j<M;j++){
        skill.at(j)+=a.at(i).at(j);
        }
      }
    }
    bool ok=true;
    for(int j=0;j<M;j++){
      if(skill.at(j)<X) ok=false;
    }
    if(ok) ans=min(ans,cost);
  }
  if(ans==INF) cout<<-1<<endl;
  else cout<<ans<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:39:24: error: expected '}' at end of input
   39 |   else cout<<ans<<endl;
      |                        ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

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

int min(int p, int q) {
	if (p < q) {
		return p;
	}else{
		return q;
	}
}

const int INF = 1001001001;

int main() {
	int n, m;
	int x;
	cin >> n >> m >> x;
	vector <int> c(n);
	int a[n][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);
		}
	}

	int ans = INF;

	for (int i = 0; i < 1 << n; i++) {
		int cost = 0;
		vector <int> d(m);
		for (int j = 0; j < n; j++) {
			if (i >> j & 1) {
				cost += c[j];
				for (int k = 0; k < m; k++) {
					d[k] += a[j][k];
				}
			}
		}
		bool ok = true;
		for (int i = 0; i < m; i++) {
			if (d[i] < x) {
				ok = false;
			}
		}
		if (ok) {
			ans = min(ans, cost);
		}
	}
	if (ans == INF) {
		cout << -1 << endl;
	}else {
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:34: error: request for member 'at' in 'a', which is of non-class type 'int [n][m]'
   24 |                         cin >> a.at(i).at (j);
      |                                  ^~
Language: C++

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

int min(int p, int q) {
	if (p < q) {
		return p;
	}else if (p > q) {
		return q;
	}
}

const int INF = 1001001001;

int main() {
	int n, m;
	int x;
	cin >> n >> m >> x;
	vector <int> c(n);
	vector <vector <int>> a(n),(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);
		}
	}

	int ans = INF;

	for (int i = 0; i < 1 << n; i++) {
		int cost = 0;
		vector <int> d(m);
		for (int j = 0; j < n; j++) {
			if (i >> j & 1) {
				cost += c[j];
				for (int k = 0; k < m; k++) {
					d[k] += a[j][k];
				}
			}
		}
		bool ok = true;
		for (int i = 0; i < m; i++) {
			if (d[i] < x) {
				ok = false;
			}
		}
		if (ok) {
			ans = min(ans, cost);
		}
	}
	if (ans == INF) {
		cout << -1 << endl;
	}else {
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:37: error: conflicting declaration 'std::vector<std::vector<int> > m'
   19 |         vector <vector <int>> a(n),(m);
      |                                     ^
a.cc:15:16: note: previous declaration as 'int m'
   15 |         int n, m;
      |                ^
a.cc: In function 'int min(int, int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
//  インフィニティの略
const int INF = 1001001001;
 pythonと違ってもうすでに12こあるよと設定
int a[12][12];
 
int main() {
  int n, m, x;
  cin >> n >> m >> x;
//   cの配列
  vector<int> c(n);
//   リピート変数i回数n
  rep(i,n) {
    cin >> c[i];
    rep(j,m) cin >> a[i][j];
  }
 
  int ans = INF;
//   集合s　0~-2n乗まで
  rep(s,1<<n) {
    int cost = 0;
    // 理解度の合計が超えているか
    vector<int> d(m);
    rep(i,n) {
    //   ずらした結果sのiビット目があってるか
      if (s>>i&1) {
        cost += c[i];
        rep(j,m) d[j] += a[i][j];
      }
    }
    // 真偽を決めるときはbook型デフォルトtrueで
    bool ok = true;
    // ただし3つ中1つでもx未満の物があったらxをfalseにする
    rep(j,m) if (d[j] < x) ok = false;
    if (ok) ans = min(ans, cost);
  }
  if (ans == INF) cout << -1 << endl;
  else cout << ans << endl;
  return 0;
}
// リニアプログラミング
// 線型計画法（せんけいけいかくほう LP; linear programming ）は、
// 数理計画法において、いくつかの1次不等式および1次等式を満たす変数の値の中で、
// ある1次式を最大化または最小化する値を求める方法である。
// 線形計画法の対象となる最適化問題を線型計画問題

Compiler output:
a.cc:8:2: error: 'python\U00003068\U00009055\U00003063\U00003066\U00003082\U00003046\U00003059\U00003067\U0000306b12\U00003053\U00003042\U0000308b\U00003088\U00003068\U00008a2d\U00005b9a' does not name a type
    8 |  pythonと違ってもうすでに12こあるよと設定
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:19:21: error: 'a' was not declared in this scope
   19 |     rep(j,m) cin >> a[i][j];
      |                     ^
a.cc:32:26: error: 'a' was not declared in this scope
   32 |         rep(j,m) d[j] += a[i][j];
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using Graph = vector<vector<int>>;
using ll = long long;


int main() {
    int n,m,x;
    cin>>n>>m>>x;
    vector<int> c(n);
    vector<vector<int>> a(n,vector<int> (m));
    vector<int> max(m,0);
    rep(i,n){
        cin>>c.at(i);
        rep(j,m){
            cin>>a.at(i).at(j);
            max.at(j)+=a.at(i).at(j);
        }
    }
    rep(i,m){
        if(max.at(i)<x){
            cout<<-1<<endl;
            return 0;
        }
    }
    int ans=1001001001;
    rep(i,1<<n){
        int cost=0;
        vector<int> d(m);
        rep(j,n){
            if(i>>j&1){　　//iのjビット目が1のとき
                cost+=c.at(j);
                rep(k,m){
                    d.at(k)+=a.at(j).at(k);
                }
            }
        }
        rep(k,m){
            if(d.at(k)<x){
                cout<<-1<<endl;
                return 0;
            }
        }
        ans=min(ans,cost);
    }
    if(ans==1001001001){
        cout<<-1<<endl;
        return 0;
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc:33:24: error: extended character 　 is not valid in an identifier
   33 |             if(i>>j&1){　　//iのjビット目が1のとき
      |                        ^
a.cc:33:24: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:33:24: error: '\U00003000\U00003000' was not declared in this scope
   33 |             if(i>>j&1){　　//iのjビット目が1のとき
      |                        ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using Graph = vector<vector<int>>;
using ll = long long;


int main() {
    int n,m,x;
    cin>>n>>m>>x;
    vector<int> c(n);
    vector<vector<int>> a(n,vector<int> (m));
    vector<int> max(m,0);
    rep(i,n){
        cin>>c.at(i);
        rep(j,m){
            cin>>a.at(i).at(j);
            max.at(j)+=a.at(i).at(j);
        }
    }
    rep(i,m){
        if(max.at(i)<x){
            cout<<-1<<endl;
            return 0;
        }
    }
    int ans=1001001001
    rep(i,1<<n){
        int cost=0;
        vector<int> d(m);
        rep(j,n){
            if(i>>j&1){
                cost+=c.at(j);
                rep(k,m){
                    d.at(k)+=a.at(j).at(k);
                }
            }
            ans=min(ans,cost);
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:19: error: expected ',' or ';' before 'for'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                   ^~~
a.cc:29:5: note: in expansion of macro 'rep'
   29 |     rep(i,1<<n){
      |     ^~~
a.cc:29:9: error: 'i' was not declared in this scope
   29 |     rep(i,1<<n){
      |         ^
a.cc:3:35: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using Graph = vector<vector<int>>;
using ll = long long;


int main() {
    int n,m,x;
    cin>>n>>m>>x;
    vector<int> c(N);
    vector<vector<int>> a(n,vector<int> (m));
    vector<int> max(m,0);
    rep(i,n){
        cin>>c.at(i);
        rep(j,m){
            cin>>a.at(i).at(j);
            max.at(j)+=a.at(i).at(j);
        }
    }
    rep(i,m){
        if(max.at(i)<x){
            cout<<-1<<endl;
            return 0;
        }
    }
    int ans=1001001001
    rep(i,1<<n){
        int cost=0;
        vector<int> d(m);
        rep(j,n){
            if(i>>j&1){
                cost+=c.at(j);
                rep(k,m){
                    d.at(k)+=a.at(j).at(k);
                }
            }
            ans=min(ans,cost);
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'N' was not declared in this scope
   12 |     vector<int> c(N);
      |                   ^
a.cc:3:19: error: expected ',' or ';' before 'for'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                   ^~~
a.cc:29:5: note: in expansion of macro 'rep'
   29 |     rep(i,1<<n){
      |     ^~~
a.cc:29:9: error: 'i' was not declared in this scope
   29 |     rep(i,1<<n){
      |         ^
a.cc:3:35: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                   ^
Language: C

#include <bits/stdc++.h>

using namespace std;
using namespace std;
#define rep(i,n) for(long long i=0; i<(long long)(n);i++)
//rep…「0からn-1まで」の繰り返し
#define rep2(i,s,n) for(long long i=s; i<=(long long)(n);i++)
//rep2…「sからnまで」の繰り返し
#define repr(i,s,n) for(long long i=s;i>=(long long)(n);i--)
//repr…「ｓからnまで」の降順の繰り返し

typedef long long ll;

const int inf = 1e9+7;
const int mod = 1e9+7;

int main(){
    int n,m,x;
    cin>>n>>m>>x;

    vector<int>c(n);
    vector<vector<int>>a(n,vector<int>(m));

    rep(i,n){
        cin>>c[i];
        rep(j,m)cin>>a[i][j];
    }

    int ans= inf;

    rep(bit,1<<n){
        int csum=0;
        vector<int>asum(m,0);
        bool jdg=true;

        rep(i,n){
            if(bit&(1<<i)){
                rep(j,m){
                    asum[j]+=a[i][j];
                }
                csum+=c[i];
            }
        }

        rep(i,m){
            if(asum[i]<x){
                jdg=false;
                break;
            }
        }

        if(jdg)ans=min(ans,csum);
    }

    cout<<ans<<endl;

}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<vector>
using namespace std;
 
int main(){
    int n, m, x;
    cin >> n >> m >> x;
    vector<vector<int>> a(n, vector<int>(m));
    vector<int> c(n);
    for(int i = 0; i < n; i++){
        cin >> c[i];
        for(int j = 0; j < m; j++)cin >> a[i][j];
    }
    int ans = 12345678;
    int all = 1<<n;
    for(int mask = 0; mask < all; mask++){
        vector<int> level(m);
        int cost = 0;
        for(int i = 0; i < n; i++){
            if((mask>>i)&1){
                cost += c[i];
                for(int j = 0; j < m; j++){
                    level[j] += a[i][j];
                }
            }
        }
        bool ok = true;
        for(int j = 0; j < m; j++){
            if(level[j] < x) ok = false;
        }
        if(ok) ans = min(ans,cost);
    }
    if(ans == 12345678) cout << -1 << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:33:44: error: expected '}' at end of input
   33 |     if(ans == 12345678) cout << -1 << endl;
      |                                            ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C

#include "bits/stdc++.h"
using namespace std;
typedef long long int lint;
typedef pair<lint, lint> plint;
typedef pair<double long, double long> pld;
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((lint)(x).size())
#define POW2(n) (1LL << (n))
#define FOR(i, begin, end) for(lint i=(begin),i##_end_=(end);i<i##_end_;i++)
#define IFOR(i, begin, end) for(lint i=(end)-1,i##_begin_=(begin);i>=i##_begin_;i--)
#define REP(i, n) FOR(i,0,n)
#define IREP(i, n) IFOR(i,0,n)
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; }
template<typename T1, typename T2> pair<T1, T2> operator+(const pair<T1, T2>& l, const pair<T1, T2>& r) { return make_pair(l.first + r.first, l.second + r.second); }
template<typename T1, typename T2> pair<T1, T2> operator-(const pair<T1, T2>& l, const pair<T1, T2>& r) { return make_pair(l.first - r.first, l.second - r.second); }
const lint MOD = 1e9 + 7, INF = 1e18;

lint N, M, X;
lint C[12];
lint arr[12][12];
int main() {
	cin.tie(0); ios_base::sync_with_stdio(false);
	cin >> N >> M >> X;
	REP(i, N) {
		cin >> C[i];
		REP(j, M) {
			cin >> arr[i][j];
		}
	}

	lint minv = INF;
	REP(i, 1 << N) {
		lint score[12];
		lint cost = 0;
		REP(j, M) score[j] = 0;
		REP(j, N) {
			if ((i >> j) % 2 == 1) {
				REP(k, M) {
					score[k] += arr[j][k];
				}
				cost += C[j];
			}
		}

		bool flag = true;
		REP(j, M) {
			flag &= (score[j] >= X);
		}
		if (flag) chmin(minv, cost);
	}
	if (minv == INF) cout << -1 << endl;
	else cout << minv << endl;
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include "bits/stdc++.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
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[i];
   for(int j = 0; j < m; j++) cin >> a[i][j];
  }
  
  int ans = 12345678;
  int cost = 0;
  int exist = 0;
  bool judge = true;
  vector<int> ability(m);
  
  for(int bit; bit << (1<<n); bit++){
    for(int i = 0; i < n; i++){
      if(bit & (1<<i)){
        for(int j = 0; j < m; j++) ability[j] = a[i][j];
        cost += c[i];
      }
    }
    
    for(int i = 0; i < n; i++){
      if(ability[i] < x) judge = false;
    }
    
    if(judge){
      ans = min(ans, cost);
    }
    
    tem = 0;
    for(int j = 0; j < m; j++) ability[j] = 0;
  }
  
  if(ans == 12345678){
    cout << -1 << endl;
  }
  else{
    cout << ans << endl;
  }
}

    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:36:5: error: 'tem' was not declared in this scope; did you mean 'tm'?
   36 |     tem = 0;
      |     ^~~
      |     tm
Language: C++

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


int main(){
	int N,M,X;
	int C[12],A[12][12]
	cin >> N >> M >> X;
	for(int i=0;i<N;i++){
		cin>>C[i];
		for(int j=0;j<M;j++)cin>>A[i][j];
	}
	int ans = 1e8;
	for (int i=0;i<1<<N;i++){
		int now[12] = {}
		int sum=0;
		for (int j=0;j<N;j++)if(i>>j&1)
		{
			sum +=C[j];
			for(int k=0;k<M;k++)now[k]+=A[j][k];
		}
		bool flag = true;
		for(int j=0;j<M;j++)if(now[j]<X)flag=False;
		if(flag&&ans>sum)ans=sum;
	}
	cout<<(ans>1e7?-1:ans)<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected initializer before 'cin'
    8 |         cin >> N >> M >> X;
      |         ^~~
a.cc:11:42: error: 'A' was not declared in this scope
   11 |                 for(int j=0;j<M;j++)cin>>A[i][j];
      |                                          ^
a.cc:16:17: error: expected ',' or ';' before 'int'
   16 |                 int sum=0;
      |                 ^~~
a.cc:19:25: error: 'sum' was not declared in this scope
   19 |                         sum +=C[j];
      |                         ^~~
a.cc:20:53: error: 'A' was not declared in this scope
   20 |                         for(int k=0;k<M;k++)now[k]+=A[j][k];
      |                                                     ^
a.cc:23:54: error: 'False' was not declared in this scope
   23 |                 for(int j=0;j<M;j++)if(now[j]<X)flag=False;
      |                                                      ^~~~~
a.cc:24:30: error: 'sum' was not declared in this scope
   24 |                 if(flag&&ans>sum)ans=sum;
      |                              ^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for( int i=0; i<(n);++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
int main(){
    int n , m , x ;
    cin >> n >> m >> x ;
    vector<int> C(n);
    vector<vector<int>> pa(n, vector<int>(m));
    rep(i,n) {
        cin >> C.at(i);
        rep(j,m){
            cin >> pa.at(i).at(j);
        }
    }
    int ans = 100100100;
    int count = 0;
    
    for (int tmp = 0; tmp < (1 << n); tmp++) {
  bitset<n> s(tmp);
  // (ビット列sに対する処理)
      count =0;
      vector<int> Ans(n);
  rep(i,n){
       
      if (s.test(i)){
      count += C.at(i);
      rep(j,m){
          Ans.at(j) += pa.at(i).at(j);
      }

      }
  }
  bool can = true;
  rep(i,m){
      if(Ans.at(i)< x){
          can = false;
      }
  }
  if(can){
      ans = min(count,ans);
  }
}
if(ans == 100100100){
    cout << -1 << endl;
}
else cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:11: error: the value of 'n' is not usable in a constant expression
   21 |   bitset<n> s(tmp);
      |           ^
a.cc:7:9: note: 'int n' is not const
    7 |     int n , m , x ;
      |         ^
a.cc:21:11: note: in template argument for type 'long unsigned int'
   21 |   bitset<n> s(tmp);
      |           ^
a.cc:27:13: error: request for member 'test' in 's', which is of non-class type 'int'
   27 |       if (s.test(i)){
      |             ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int n,m,x,ans=2e9+7;
int c[15],a[15][15],post[15];
int main()
{
cin>>n>>m>>x;
for(int i=1;i<=n;i++)
{
	cin>>c[i];
	for(int j=1;j<=m;j++)
	cin>>a[i][j];
}
while(post[0]==0)
{
	int in[15]={0},money=0;
	for(int i=1;i<=n;i++)
	{
		if(pos[i]==1)
		{
			money+=c[i];
			for(int j=1;j<=m;j++)
			in[j]+=a[i][j];
		}
	}
	int flag=1;
	for(int i=1;i<=m;i++)
	{
		if(in[i]<x)
		{
			
			flag=0;
			break;
		}
	}
	if(flag)
	ans=min(ans,money);
	for(int i=n;i>=0;i--)
	{
		if(pos[i]==1)
		post[i]=0;
		else
		{
			post[i]=1;
			break;
		}
		
	}
}
if(ans!=2e9+7)
cout<<ans;
else
cout<<-1;
return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: 'pos' was not declared in this scope; did you mean 'pow'?
   20 |                 if(pos[i]==1)
      |                    ^~~
      |                    pow
a.cc:41:20: error: 'pos' was not declared in this scope; did you mean 'pow'?
   41 |                 if(pos[i]==1)
      |                    ^~~
      |                    pow
Language: C++

#include<bits/stdc++.h>
#define ll long long
const int N=100005;
using namespace std;
ll m,n,c[15],a[15][15],p[15],in[15],x,ans=2e9+7,mo;
int main(){
	cin>>n>>m>>;
	for(int i=1;i<=n;i++)
	{
		cin>>c[i];
		for(int j=1;j<=m;j++) cin>>a[i][j];
	}
	while(p[0]==0)
	{
		mo=0;
		for(int i=1;i<=n;i++)
		{
			if(p[i]==1)
			{
				mo+=c[i];
				for(int j=1;j<=m;j++) in[j]=a[i][j];
			}
		}
		int f=1;
		for(int i=1;i<=m;i++)
			if(in[i]<x) {f=0;break;}
		if(f) ans=min(ans,mo);
		for(int i=n;i>=0;i--)
		{
			if(p[i]==1) p[i]=0;
			else {p[i]=1;break;}
		}
	}
	if(ans!=2e9+7) cout<<ans;
	else cout<<-1;
    return 0;
}
//01枚举 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected primary-expression before ';' token
    7 |         cin>>n>>m>>;
      |                    ^
Language: Java

mport java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);

		int N = input.nextInt();
		int M = input.nextInt();
		int X = input.nextInt();

		int minCost = -1;

		int[][] bookList = new int[N][M + 1];

		//参考書リストの作成
		for(int i = 0; i < N; i++) {
			for(int m = 0; m <= M ;m++) {

				int n = input.nextInt();
				bookList[i][m] = n;

			}
		}
		input.close();

		for(int bit = 0; bit < (1 << N); bit++) {
			int[] buyList = new int[M +1];
			int flag = 0;

			for(int i =0;i < N; ++i ) {
				if((1 & bit >> i) == 1) {

					for(int m = 0; m < M + 1; m++) {

						buyList[m] = buyList[m] + bookList[i][m];
						//System.out.println(buyList[m]);

					}
				}
			}
			for(int m =1; m < M + 1; m++) {

				if(buyList[m] < X) {

					flag = 1;

				}

			}
			//System.out.println(buyList[0]);

			if(((minCost > 0) & (buyList[0] < minCost) & flag == 0) | ((minCost == -1) & flag == 0) ) {
				minCost = buyList[0];
			}
		}

		System.out.println(minCost);

	}
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error