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

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int n,m,x;
int ans=0;
int c[12]={0};
int a[12][12]={{0}};
int ability[12]={0};
int select[12]={0};
int tmp;

void sum(int select[])
{
  tmp=0;
  for(int j=0;j<m;j++) ability[j]=0;
  for(int i=0;i<n;i++)
  {
    if(select[i]==1)
    {
      tmp+=c[i];
      for(int j=0;j<m;j++)
      {
        ability[j]+=a[i][j];
      }
    }
  }
}

void search(int i)
{
  for(int k=0;k<=1;k++)
  {
    select[i]=k;
    if(i==n-1)
    {
      sum(select);
      int flag=0;
      for(int j=0;j<m;j++)
      {
        if(ability[j]<x)
        {
          flag=1;
          break;
        }
      }
      if(flag==0 && ans>tmp) ans=tmp;
    }
    else search(i+1);
  }
}

int main(void)
{
  scanf("%d %d %d",&n,&m,&x);
  for(int i=0;i<n;i++)
  {
    scanf("%d",&c[i]);
    ans+=c[i];
    for(int j=0;j<m;j++)
    {
      scanf("%d",&a[i][j]);
      ability[j]+=a[i][j];
    }
  }

  for(int j=0;j<m;j++)
  {
    if(ability[j]<x)
    {
      printf("-1\n");
      return 0;
    }
  }

  search(0);
  printf("%d\n",ans);

  return 0;
}

Compiler output:
main.c:10:5: error: 'select' redeclared as different kind of symbol
   10 | int select[12]={0};
      |     ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179,
                 from /usr/include/stdlib.h:514,
                 from main.c:2:
/usr/include/x86_64-linux-gnu/sys/select.h:102:12: note: previous declaration of 'select' with type 'int(int,  fd_set * restrict,  fd_set * restrict,  fd_set * restrict,  struct timeval * restrict)'
  102 | extern int select (int __nfds, fd_set *__restrict __readfds,
      |            ^~~~~~
Language: C++

#include <cstdio>
#include <cmath>
#include <limits>
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <stack>
#define rep(i, s, g) for (i = s; i < g; i++)
using namespace std;
using ll = long long;
const int inf = 1000000000; //10^9

ll N,M,X;
vector<ll>C;
vector<vector<ll>>A;
int ans=inf;

void search(int x,int cost,vector<int>level){
    if (x==N)
    {
        bool ok = true;
        for (int i = 0; i < M; i++)
        {
            if (level[i]<X)
            {
                ok = false;
            }
        }
        if (ok) //boolだからtかfしかない
        {
            ans = min(ans,cost);
        }
        return; 
    }
    search(x+1,cost,level);
    for (int i = 0; i < M; i++)
    {
        level[i]+=A[x][i];
    }
    search(x+1,cost+c[x],level);
}



int main(){
    cin >> N >> M >> X;
    C.resize(N);
    A.resize(N,vector<ll>(M));
    for (ll i = 0; i < N; i++)
    {
        cin >> C[i];
        for (ll j = 0; j < M; j++)
        {
            cin >> A[i][j];
        }  
    }
    vector<int>level(M,0);
    search(0,0,level);

    cout << ans << endl;
    
}

Compiler output:
a.cc: In function 'void search(int, int, std::vector<int>)':
a.cc:45:21: error: 'c' was not declared in this scope
   45 |     search(x+1,cost+c[x],level);
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i<(n);++i)
const int INF =1001001001;

int a[12][12];
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,i<<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(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;
}










Compiler output:
a.cc:19:12: error: macro "rep" requires 2 arguments, but only 1 given
   19 |     rep(i.n){
      |            ^
a.cc:3:9: note: macro "rep" defined here
    3 | #define rep(i,n) for (int i=0; i<(n);++i)
      |         ^~~
a.cc: In function 'int main()':
a.cc:16:9: error: 'i' was not declared in this scope
   16 |   rep(s,i<<n){
      |         ^
a.cc:3:35: note: in definition of macro 'rep'
    3 | #define rep(i,n) for (int i=0; i<(n);++i)
      |                                   ^
a.cc:19:5: error: 'rep' was not declared in this scope
   19 |     rep(i.n){
      |     ^~~
Language: C

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    ll n, m, x;
    cin >> n >> m >> x;

    vector<vector<ll>> v(n, vector<ll>(m+1,0));
    for (int i=0; i<n; i++) {
        for (int j=0; j<=m; j++) {
            cin >> v[i][j];
        }
    }

    ll ans = 100001;

    for (int bit=0; bit<(1<<n); bit++) {
        
        vector<ll> tmp(m+1, 0);
        for (int i=0; i<n; i++) {
            if (bit&(1<<i)) {
                for (int j=0; j<=m; j++) {
                    tmp[j] += v[i][j];
                }
            }
        }

        bool check = true;
        for (int j=1; j<=m; j++) if (!(tmp[j]>=x)) check = false;
        if (check) ans = min(ans, tmp[0]);

    }

    if (ans==100001) ans = -1;

    cout << ans << "\n";    

    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;
        typedef pair<int,vector<int> > pairs;
        int main()
        {
          int n,m,x;
          cin>>n>>m>>x;
          vector<pairs>s;
          vector<int>v;
          int c,q;
          for(int i=0;i<n;i++)
          {
            cin>>c;
            for(int j=0;j<m;j++)
            {
              cin>>q;
              v.push_back(q);
            }
            pairs d=make_pair(c,v);
            s.push_back(d);
          }
          sort(s.begin(),s.end());
          int w=1;
          int check=0;
          int cost=0;
          int min=100000;
          for(int z=0;z<(n-1);z++)
          {
          for(int i=z;i<n-1;i++)
          { cost+=s[i].first;
            for(int j=0;j<m;j++)
            {
            check= s[i].second[j]+s[i+1].second[j];
              if(check<x)
              break;
            }
           if(check>x)
            { w=0;
              cost+=a=s[i+1].first;
             break;
             }
          }
            if(cost<min)
              min=cost;
            cost=0;
          }
        if(w==1)
        min=(-1);
          cout<<min<<endl;
          return 0;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:39:21: error: 'a' was not declared in this scope
   39 |               cost+=a=s[i+1].first;
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef pair<int,vector<int>> pairs;
int main()
{
  int n,m,x;
  cin>>n>>m>>x;
  vector<pairs>s;
  vector<int>v;
  int c,q;
  for(int i=0;i<n;i++)
  {
    cin>>c;
    for(int j=0;j<m;j++)
    {
      cin>>q;
      v.push_back(q);
    }
    pairs d=make_pair(c,v);
    s.push_back(d);
  }
  sort(s.begin(),s.end());
  int check=0;
  int cost=0;
  int min=100000
  for(int z=0;z<(n-1);z++)
  {
  for(int i=z;i<n-1i++)
  { cost+=s[i].first;
    for(int j=0;j<m;j++)
    {
    check= s[i].second[j]+s[i+1].second[j];
      if(check<x)
      break;
    }
   if(check>x)
     break;
  }
    if(cost<min)
      min=cost;
    cost=0;
  }
  cout<<min<<endl;
  return 0;
}
        
      

Compiler output:
a.cc: In function 'int main()':
a.cc:26:3: error: expected ',' or ';' before 'for'
   26 |   for(int z=0;z<(n-1);z++)
      |   ^~~
a.cc:26:15: error: 'z' was not declared in this scope
   26 |   for(int z=0;z<(n-1);z++)
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,x;
  cin >> n >> m >> x;
  vector<int> c(n);
  int a[n][m];
  rep(i,n){
    cin >> c[i];
    rep(j,m)
      cin >> a[i][j];
  }
  int ans=INT_MAX;
  rep(i,1<<n){
    int answer=0;
    vector<int> temp(m);
    rep(j,n){
      if(i>>j&1){
        answer+=c[j];
        rep(k,m)temp[k]+=a[j][k];
      }
    }
    rep(j,m) if(temp[j]<x)ans=INT_MAX;
    ans=min(answer,ans);
  }
  cout <<(INT_MAX==ans?-1:ans) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   rep(i,n){
      |       ^
a.cc:8:3: error: 'rep' was not declared in this scope
    8 |   rep(i,n){
      |   ^~~
Language: C

#include <iostream>
#include <string>
#include <math.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
using namespace std;

typedef long long ll;
#define rep(i, n) for(int i = 0; i < n; i++)

const int INF = 101010101;

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 ans = INF; //すべての買い方の中での、条件を満たす場合の値段の最小値
    rep(s, 1<<n){ //sに、バイナリビット列を入れていく（0~10^nの2進数の値まで）
        int cost = 0; //買い終えた後の値段の合計
        int d[m] = {0}; //各アルゴリズムの理解度
        rep(i, n){
            if(s>>i&1){ //i個目の本を買うかどうか調べる（sの本の番号と一致する値を、最下位ビットに移動している
                cost += c[i];
                rep(j, m) d[j] += a[i][j];
            }
        }
        bool is = true;
        rep(j, m) if(d[j] < x) is = false; //すべてのアルゴリズムの理解度がx以上であるかの確認
        if(is) ans = min(ans, cost); //上の条件を満たすなら、ans(最小の値段)を更新
    }
    if(ans == INF) cout << -1 << endl; //すべてのアルゴリズムの理解度がx以上となるような買い方が無かった場合
    else cout << ans << endl;
    return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
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;

int a[12][12];

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) {//sは部分集合,1<<nで1を左にnずらす(2^n)
    int cost = 0;
    vector<int> d(m);
    rep(i,n) {
      if ((s>>i)&bit) {//sの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;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:18: error: 'bit' was not declared in this scope
   25 |       if ((s>>i)&bit) {//sのiビット目が立っているか
      |                  ^~~
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;

int a[12][12];

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) {//sは部分集合,1<<nで1を左にnずらす(2^n)
    int cost = 0;
    vector<int> d(m);
    rep(i,n) {
      if (s>>i&bit) {//sの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;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:16: error: 'bit' was not declared in this scope
   25 |       if (s>>i&bit) {//sのiビット目が立っているか
      |                ^~~
Language: C

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<n;i++)
///1<<3シフト演算子 とは　0001の1を三つずらして1000にする, これは8を表しておりつまりbitは0から7まで
#define all(x) (x).begin(),(x).end()
#define cyes cout<<"Yes"<<endl
#define cno cout<<"No"<<endl
#define sp <<" "<<
#define CST(x) cout<<fixed<<setprecision(x)
#define PI 3.14159265359
#define MOD 1000000007
using namespace std;
using ll = long long;
using ld = long double;

//条件式 ? 真の場合の文 : 偽の場合の文
//abs(x) = (x の絶対値)
//string S  S,at(i),S += T,S += c,S.size(),S.substr(l)l文字目から最後まで,
///S.substr(l, r)l文字目からl+r-1文字目 n文字目から0個で空列を返せる
//*min_element(all(x)) *max_element(all(x))
//vi x; x.back(),x.front(),x.push_back(),x.pop_back()
//swap(a, b)    c
//gcd(a, b)最大公約数
//sort(all(x)),reverse(all(x)),sort(x.begin()+l,a.begin()+r)lからrまで
//stack<int> a; a.push(x),a.pop(),a.top(),a.empty()bool
//queue<int> b; b.push(x),b.pop(),b.front(),b.empty()bool,b.size() 要素が小さい順
//priority_queue<int, vector<int>, greater<int>> c,c.top()
//map<int, int> M1; 変数[key] = value; 変数.erase(key); 変数.at(key); 変数.count(key)所属判定　変数.size()
//find(all(x), key)boolソート済みのベクトル
//*lower_bound(all(x),k)以上の最小の要素,*uppper_bound(all(x),k)より大きい最小の要素
//char('0'+cnt) 数字cntからcharへの変換
//int(char-'0') charからintへの変換


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.at(i);
        rep(j,m) cin >> a.at(i).at(j);
    }
    
    int cost = 1000000000;

    rep(bit,1 << n){
        vector<int> nattoku(m,0);
        int cost_now = 0;
            rep(i,n){
                if(bit & (1 << i)){
                    rep(j,m) nattoku.at(j) += a.at(i).at(j);
                    cost_now += c.at(i);
                }
            }
        bool ok = true;
        rep(i,m) if(nattoku.at(i) < x) ok = false;
        if(ok) cost = min(cost,cost_now);
    }
    if(cost == 1000000000) cout << -1 << endl;
    else cout << cost << endl;
    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>
#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;
int main(){
   int n,m,x;
   cin>>n>>m>>x;
   vector<int> c(n);
   int a[12][12];
   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){
         //sのiビット目が1であるときのみ
         if(s>>i&1){
            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;
   return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:12: error: expected ';' before '}' token
   37 |    return 0
      |            ^
      |            ;
   38 | }
      | ~
Language: C++

#include<iostream>
#include<stack>

using namespace std;

int min(int n, int*);

int main(void) {
	int N, M, X;
	int* C;
	int** A;

	cin >> N >> M >> X;
	C = new int[N];
	A = new int* [N];
	for (int i = 0; i < N; i++) {
		cin >> C[i];
		A[i] = new int[M];
		for (int j = 0; j < M; j++) {
			cin >> A[i][j];
		}
	}

	int output = (int)("inf");
	stack<string> Stack;
	Stack.push("0");
	Stack.push("1");

	while (!Stack.empty()) {
		string temp = Stack.top();
		Stack.pop();

		if (temp.length() == N) {
			int* skills = new int[M];
			int price = 0;
			for (int i = 0; i < M; i++) skills[i] = 0;

			for (int i = 0; i < N; i++) {
				for (int j = 0; j < M; j++)
					skills[j] += (temp[i] - '0') * A[i][j];
				price += (temp[i] - '0') * C[i];
			}

			if (min(M, skills) >= X)
				if (price < output) output = price;
		}
		else {
			Stack.push(temp + "0");
			Stack.push(temp + "1");
		}
	}

	if (output == (int)("inf")) cout << -1 << endl;
	else cout << output << endl;

	return 0;
}

int min(int n, int* arr) {
	int m = (int)("inf");
	for (int i = 0; i < n; i++) {
		if (arr[i] < m) m = arr[i];
	}
	return m;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: cast from 'const char*' to 'int' loses precision [-fpermissive]
   24 |         int output = (int)("inf");
      |                      ^~~~~~~~~~~~
a.cc:53:23: error: cast from 'const char*' to 'int' loses precision [-fpermissive]
   53 |         if (output == (int)("inf")) cout << -1 << endl;
      |                       ^~~~~~~~~~~~
a.cc: In function 'int min(int, int*)':
a.cc:60:17: error: cast from 'const char*' to 'int' loses precision [-fpermissive]
   60 |         int m = (int)("inf");
      |                 ^~~~~~~~~~~~
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <bitset> // bitset
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
using namespace std;

int main() {
  int N, M, X;
  cin >> N >> M >> X;
  vector<vector<int>> skill(N, vector<int>(M));
  vector<int> cost(N);
  for(int i=0; i < N; i++){
    cin >> cost.at(i);
    for(int j =0; j < M; j++){
      cin >> skill.at(i).at(j);
    }
  }
  int ans = 12345678;
  for(int k=0; k< 1<<N; k++){
    vector<int> level(M);
    int money =0;
    for(int i = 0; i < N; i++){
      if((k>>i)&1){
        money += cost.at(i);
        for(int j=0;j<M;j++){
          level.at(j) += skill.at(i).at(j);
        }
      }
    }
    bool ok = true;
    for(int i =0; i<M; i++){
      if(level.at(i) < X){
        ok = false;
      }
    }
    if(ok){
      ans = min(ans,money);
      
    }
   if(ans == 12345678){
     cout << -1 << endl;
   }
    else{
  
  cout << ans << endl;
    }
}


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


#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <bitset> // bitset
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
using namespace std;

int main() {
  int N, M, X;
  cin >> N >> M >> X;
  vector<vector<int>> skill(N, vector<int>(M));
  vector<int> cost(N);
  for(int i=0; i < N; i++){
    cin >> cost.at(i);
    for(int j =0; j < M; j++){
      cin >> skill.at(i).at(j);
    }
  }
  int ans = 1000000000000000
  for(int k=0; k< 1<<n; k++){
    vector<int> level(M);
    int money =0;
    for(int i = 0; i << N; i++){
      if((k>>i)&1){
        money += cost.at(i);
        for(int j=0;j<M;j++){
          level.at(j) += skill.at(i).at(j);
        }
      }
    }
    bool ok = true;
    for(int i =0; i<M; i++){
      if(level.at(i) < X){
        ok = false;
      }
    }
    if(ok == true){
      cout << min(ans,cost) << endl;
    }
    else{cout << -1 << endl;
        }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: warning: overflow in conversion from 'long int' to 'int' changes value from '1000000000000000' to '-1530494976' [-Woverflow]
   20 |   int ans = 1000000000000000
      |             ^~~~~~~~~~~~~~~~
a.cc:21:3: error: expected ',' or ';' before 'for'
   21 |   for(int k=0; k< 1<<n; k++){
      |   ^~~
a.cc:21:16: error: 'k' was not declared in this scope
   21 |   for(int k=0; k< 1<<n; k++){
      |                ^
a.cc:21:22: error: 'n' was not declared in this scope
   21 |   for(int k=0; k< 1<<n; k++){
      |                      ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int l,j,i,n,m,k;
	cin>>n>>m>>k;
	int ara[n][m],set[n],skill[m]={0},cost=0,ans=INT_MAX;
	for(i=0;i<n;i++){
		cin>>set[i];
		for(j=0;j<m;j++){
			cin>>ara[i][j];
		}
	}
	for(i=0;i<(1<<n);i++){
		cost=0;
		skill[0]={0};
		for(j=0;j<n;j++){
			if(i&(1<<j)){
				cost+=set[j];
				for(l=0;l<m;l++){
					skill[l]+=ara[j][l];
				}
			}
		}
		int y=1;
		for(j=0;j<m;j++){
			if(skill[j]<k){
				y=0;
				break;
			}
		}
		if(y){
			ans=min(cost,ans);
		}
	}
	if(ans!=INT_MAX){
		cout<<ans<<endl;
	}
	else{
		cout<<-1<<endl;
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:54: error: 'INT_MAX' was not declared in this scope
    7 |         int ara[n][m],set[n],skill[m]={0},cost=0,ans=INT_MAX;
      |                                                      ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: C++

#include<bits\stdc++.h>
using namespace std;
int main()
{
	int l,j,i,n,m,k;
	cin>>n>>m>>k;
	int ara[n][m],set[n],skill[m]={0},cost=0,ans=INT_MAX;
	for(i=0;i<n;i++){
		cin>>set[i];
		for(j=0;j<m;j++){
			cin>>ara[i][j];
		}
	}
	for(i=0;i<(1<<n);i++){
		cost=0;
		skill[0]={0};
		for(j=0;j<n;j++){
			if(i&(1<<j)){
				cost+=set[j];
				for(l=0;l<m;l++){
					skill[l]+=ara[j][l];
				}
			}
		}
		int y=1;
		for(j=0;j<m;j++){
			if(skill[j]<k){
				y=0;
				break;
			}
		}
		if(y){
			ans=min(cost,ans);
		}
	}
	if(ans!=INT_MAX){
		cout<<ans<<endl;
	}
	else{
		cout<<-1<<endl;
	}
    return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
    1 | #include<bits\stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
template <typename T>
using vec = std::vector<T>;

int N, M, X;
int ans = 1e9 + 7;
vec<int> C(12);
vec<vec<int>> A(12, vec<int>(12, 0));

void dfs(int now, int cost, vec<int> Xs) {
    if (now == N) {
        bool flag = true;
        for (auto e : Xs)
            if (e > 0) flag = false;
        if (flag) ans = min(ans, cost);
        return ;
    }

    dfs(now+1, cost, Xs);
    for (int i = 0; i < M; ++i)
        Xs[i] -= A[now][i];
    dfs(now+1, cost + C[now], Xs);
}

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

    rep(i, N) {
        cin >> C[i];
        rep(j, M) cin >> A[i][j];
    }

    dfs(0, 0, vec<int>(M, X));
    cout << (ans == (int)1e9 + 7 ? -1 : ans) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:24: error: 'll' was not declared in this scope
    2 | #define rep(i, n) for (ll i = 0; i < (n); i++)
      |                        ^~
a.cc:30:5: note: in expansion of macro 'rep'
   30 |     rep(i, N) {
      |     ^~~
a.cc:30:9: error: 'i' was not declared in this scope
   30 |     rep(i, N) {
      |         ^
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (ll i = 0; i < (n); i++)
      |                                  ^
a.cc:32:13: error: expected ';' before 'j'
   32 |         rep(j, M) cin >> A[i][j];
      |             ^
a.cc:2:27: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (ll i = 0; i < (n); i++)
      |                           ^
a.cc:32:13: error: 'j' was not declared in this scope; did you mean 'jn'?
   32 |         rep(j, M) cin >> A[i][j];
      |             ^
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (ll i = 0; i < (n); i++)
      |                                  ^
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>

using namespace std;

int n, m;
int a[15][15];
int c[15];
int ans = INT_MAX;
int x;

void cal(int choose[], int order);
int main()
{
    scanf("%d%d%d", &n, &m, &x);
    for(int i=0; i<n; i++){
        scanf("%d", &c[i]);
        for(int j=0; j<m; j++)
            scanf("%d", &a[i][j]);
    }
    int choose[15] = {};
    cal(choose, 0);
    if(ans == INT_MAX)
        printf("-1\n");
    else
        printf("%d\n", ans);
}

void cal(int choose[], int order)
{
    if(order == n){
        int cap[15] = {};
        for(int i=0; i<n; i++){
            if(choose[i]){
                for(int j=0; j<m; j++)
                    cap[j] += a[i][j];
            }
        }
        for(int i=0; i<m; i++){
            if(cap[i] < x)
                return;
        }
        int cost = 0;
        for(int i=0; i<n; i++)
            cost += c[i]*choose[i];
        ans = min(ans, cost);
        return;
    }
    for(int i=0; i<2; i++){
        choose[order] = i;
        cal(choose, order+1);
    }
}


Compiler output:
a.cc:11:11: error: 'INT_MAX' was not declared in this scope
   11 | int ans = INT_MAX;
      |           ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include <string.h>
  +++ |+#include <climits>
    5 | 
a.cc: In function 'int main()':
a.cc:25:15: error: 'INT_MAX' was not declared in this scope
   25 |     if(ans == INT_MAX)
      |               ^~~~~~~
a.cc:25:15: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++


#include <bits/stdc++.h>
using namespace std;typedef long long ll;
#define int ll
#define N 100005
#define pb push_back
#define pv(x) cout<<#x<<": ";for(auto k:x){ cout<<k<<" "; }cout<<endl;
#define dbg(x) cout<<#x<<": "<<x<<endl;
#define p(A,B) (power(A,B))
inline int mul(int a, int b) {return (int) ((long long) a * b);}
inline int power(int a, long long b) {int res = 1;while (b > 0) {if (b & 1) {res = mul(res, a);}a = mul(a, a);b >>= 1;}return res;}

int n,m,ni,mi;
// int num[N];
int ok=false;


int x;

void solve(){
	cin >> n>>m;
	cin >> x;
	vector<vector<int> > v;
	vector<int> p;
	for(int i=0;i<n;i++){
		int ci;
		cin >> ci;
		p.push_back(ci);
		vector<int> temp;
		temp.clear();
		for(int j=0;j<m;j++){
			int mi;
			cin >> mi;
			temp.pb(mi);
		}
		v.pb(temp);
	}
	vector<int> book;
	int mn=LLONG_MAX;
	for(int i=0;i<1<<n;i++){
		book.clear();
		book.resize(m,0);
		int cursum=0;
		for(int j=0;j<n;j++){
			if((i>>j)&1)){
				cursum+=p[j];
			}
			if((i>>j)&1){
				for(int k=0;k<m;k++){
					book[k]+=v[j][k];
				}
			}
		}
		int flag=1;
		for(int k=0;k<m;k++){
			if(book[k]<x)flag=0;
			break;
		}
		if(flag){
			mn=min(mn,cursum);
		}
	}
	cout<<(mn==LLONG_MAX?-1:mn)<<endl;
}

int32_t main(){cin.tie(0);ios_base::sync_with_stdio(NULL);
	int t=1;
	while(t--) solve();
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:45:37: error: expected primary-expression before ')' token
   45 |                         if((i>>j)&1)){
      |                                     ^
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;

int a[12][12];

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 and = ;
    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(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;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: expected ';' before '}' token
   17 |     rep(j,m) cin>> a[i][j]
      |                           ^
      |                           ;
   18 |     }
      |     ~                      
a.cc:20:13: error: expected unqualified-id before '=' token
   20 |     int and = ;
      |             ^
a.cc:27:37: error: expected ';' before '}' token
   27 |             rep(j,m) d[j] += a[i][j]
      |                                     ^
      |                                     ;
   28 |             }
      |             ~                        
a.cc:32:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   32 |         if (ok) ans = min(ans, cost);
      |                 ^~~
      |                 abs
a.cc:34:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |     if (ans == INF) cout << -1 << endl;
      |         ^~~
      |         abs
Language: Java

import java.util.*;

import jdk.nashorn.internal.ir.Flags;

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();
        sc.nextLine();

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

        for (int i = 0; i < N; i++) {
            for (int j = 0; j <= M; j++) {
                list[i][j] = sc.nextInt();
            }
            sc.nextLine();
        }

        int okane = 0;
        int ans = Integer.MAX_VALUE;
        
        for (int i = 0; i < Math.pow(2, N); i++) {
            int[] abi = new int[M];
            String bit = Integer.toBinaryString(i);

            for (int j = bit.length()-1; j >= 0 ;  j--) {
                if (bit.charAt(j) == '1') {
                    okane += list[bit.length()-1-j][0];
                    for (int k = 0; k < M; k++) {
                        abi[k] += list[bit.length()-1-j][k+1];
                    }
                }
            }

            if (check(abi,X) && okane <= ans) { ans = id(okane);; }
            okane = 0;

        }
        if(ans == Integer.MAX_VALUE) {ans = -1;}
        System.out.println(ans);
    }

    static int id(int i) {
        return i;
    } 

    static boolean check (int[] k,int x) {
        for (int i = 0; i < k.length; i++) {
            if (k[i] < x) {
                return false;
            }
        }
        return true;
    }
}

Compiler output:
Main.java:3: error: package jdk.nashorn.internal.ir does not exist
import jdk.nashorn.internal.ir.Flags;
                              ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef vector<double> dvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
#define fs first
#define sc second
const int INF 1001001001;
int main()	{
  int n,m,x;
  cin>>n>>m>>x;
  vector<int>c(n);
  int a[n][m];
  rep(i,n){
    cin>>c[i];
    rep(j,m){
      cin>>a[i][j];
    }
  }
  int ans=INF;
  rep(s,s>>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 ex=true;
      rep(j,m){
        if(d[j]<x){
          ex=false;
        }
      }
      if(ex==true){
        ans=min(ans,cost);
      }
  }
  if(ans==INF) cout<<-1<<endl;
  else cout<<ans<<endl;
}
          
          

Compiler output:
a.cc:18:15: error: expected initializer before numeric constant
   18 | const int INF 1001001001;
      |               ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:30:11: error: 'INF' was not declared in this scope
   30 |   int ans=INF;
      |           ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef vector<double> dvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
#define fs first
#define sc second
const int inf 1001001001;
int main()	{
  int n,m,x;
  cin>>n>>m>>x;
  vector<int>c(n);
  int a[n][m];
  rep(i,n){
    cin>>c[i];
    rep(j,m){
      cin>>a[i][j];
    }
  }
  int ans=inf;
  rep(s,s>>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 ex=true;
      rep(j,m){
        if(d[j]<x){
          ex=false;
        }
      }
      if(ex==true){
        ans=min(ans,cost);
      }
  }
  if(ans==inf) cout<<-1<<endl;
  else cout<<ans<<endl;
}
          
          

Compiler output:
a.cc:18:15: error: expected initializer before numeric constant
   18 | const int inf 1001001001;
      |               ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:30:11: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   30 |   int ans=inf;
      |           ^~~
      |           ynf
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef vector<double> dvec;
typedef vector<vector<int>>data vvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
#define fs first
#define sc second
const int inf 1100100001;
int main()	{
  int n,m,x;
  cin>>n>>m>>x;
  vector<int>c(n);
  int a[n][m];
  rep(i,n){
    cin>>c[i];
    rep(j,m){
      cin>>a[i][j];
    }
  }
  int ans=inf;
  rep(s,s>>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 ex=true;
      rep(j,m){
        if(d[j]<x){
          ex=false;
        }
      }
      if(ex==true){
        ans=min(ans,cost);
      }
  }
  if(ans==inf) cout<<-1<<endl;
  else cout<<ans<<endl;
}
          
          

Compiler output:
a.cc:12:33: error: expected initializer before 'vvec'
   12 | typedef vector<vector<int>>data vvec;
      |                                 ^~~~
a.cc:19:15: error: expected initializer before numeric constant
   19 | const int inf 1100100001;
      |               ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:31:11: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   31 |   int ans=inf;
      |           ^~~
      |           ynf
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef vector<double> dvec;
typedef vector<vector<int>>data vvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
#define fs first
#define sc second
const int inf 20100100001;
int main()	{
  int n,m,x;
  cin>>n>>m>>x;
  vector<int>c(n);
  int a[n][m];
  rep(i,n){
    cin>>c[i];
    rep(j,m){
      cin>>a[i][j];
    }
  }
  rep(s,s>>n){
    int cost=0;
    int ans=inf;
    vector<int>d(m);
    rep(i,n){
      if(s<<(i&1)){
        cost+=c[i];
        rep(j,m){
          d[j]+=a[i][j];
        }
      }
    }
      bool ex=true;
      rep(j,m){
        if(d[j]<x){
          ex=false;
        }
      }
      if(ex==true){
        ans=min(ans,cost);
      }
  }
  if(ans==inf) cout<<-1<<endl;
  else cout<<ans<<endl;
}
          
          

Compiler output:
a.cc:12:33: error: expected initializer before 'vvec'
   12 | typedef vector<vector<int>>data vvec;
      |                                 ^~~~
a.cc:19:15: error: expected initializer before numeric constant
   19 | const int inf 20100100001;
      |               ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:33:13: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   33 |     int ans=inf;
      |             ^~~
      |             ynf
a.cc:53:6: error: 'ans' was not declared in this scope; did you mean 'abs'?
   53 |   if(ans==inf) cout<<-1<<endl;
      |      ^~~
      |      abs
a.cc:53:11: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   53 |   if(ans==inf) cout<<-1<<endl;
      |           ^~~
      |           ynf
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)


using namespace std;

#define MAX_N 12
#define MAX_M 12

const int INF = 1001001001;


int main() {
    int N, M, X;
    int A[MAX_N][MAX_M];
    int C[MAX_N];
    //int understand[MAX_M];
    
    

    scanf("%d %d %d", &N, &M, &X);
    //printf("N = %d M = %d X = %d\n", N, M, X);
    for (int i = 0; i < N; i++) {
        scanf("%d", &C[i]);
        //printf("C[%d] = %d\n", i, C[i]);
        for (int j = 0; j < M; j++) {
            scanf("%d", &A[i][j]);
            //printf("A[%d][%d] = %d\n", i, j, A[i][j]);
        }
    }

    
    int answer = INF;

    for (int s = 0; s < 1 << N; s++) { // 不等号を忘れずに
        int cost = 0; // ループするたびにcost をリセットしておく必要がある
        for (int j = 0; j < M; j++) { // ループするたびに理解度をリセットする
            understand[j] = 0;
        } 
        // vector<int> understand(M);
        for (int i = 0; i < N; i++) {
                if (s >> i & 1) {
                    cost += C[i];
                    for (int j = 0; j < M; j++) { // costを足したら，M 回理解度も足す
                        understand[j] += A[i][j];
                    }
                }
        }
    bool ok = true;
    for (int j = 0; j < M; j++) {
        if (understand[j] < X) ok = false; //途中どこかでokがfalseになると，以降もずっとfalseのまま (値がリセットされない)
    }

    if (ok) {
        answer = min(answer, cost);
    }
    }
    if (answer == INF) answer = -1; //answer の値が更新されない → ok = false → 理解度がX以下が少なくとも一つあり

    printf("%d\n", answer);

    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:13: error: 'understand' was not declared in this scope
   39 |             understand[j] = 0;
      |             ^~~~~~~~~~
a.cc:46:25: error: 'understand' was not declared in this scope
   46 |                         understand[j] += A[i][j];
      |                         ^~~~~~~~~~
a.cc:52:13: error: 'understand' was not declared in this scope
   52 |         if (understand[j] < X) ok = false; //途中どこかでokがfalseになると，以降もずっとfalseのまま (値がリセットされない)
      |             ^~~~~~~~~~
Language: C++

#include <algorithm>
#include <cstring>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;

const int INF = 1001001001;

int a[12][12];

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(i, 1 << n) {
    int cost = 0;
    vector<int> d(m);
    rep(i, n) {
      if (s & (1 << 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;
  else
    cout << ans;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:11: error: 's' was not declared in this scope
   30 |       if (s & (1 << i)) {
      |           ^
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stdbool.h>
#include <time.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;
int main(void)
{
    long long int N, M, X;
    long long int min1 = INT_MAX;
    cin >> N >> M >> X;

    vector<vector<long long int>> vec1(N, vector<long long int>(M + 1));

    for (int i = 0; i < N; i++)
    {
        for (int j = 0; j < M + 1; j++)
        {
            
            cin >> vec1[i][j];
        }
    }

    // {0, 1, ..., n-1} の部分集合の全探索
    for (int bit = 0; bit < (1 << N); ++bit)
    {
        vector<long long int> sei(M + 1, 0);
        /* bit で表される集合の処理を書く */
        //cout << bit << endl;
        /* きちんとできていることを確認してみる */
        // bit の表す集合を求める

        for (int i = 0; i < N; ++i)
        {

           // cout << i << endl;
            if (bit & (1 << i))
            { // i が bit に入るかどうか
                for (int r = 0; r < M + 1; r++)
                {
                    sei[r] += vec1[i][r];
                }
            }
        }
        int count = 0;
        for (int u = 1; u < M + 1; u++)
        {
            //cout << u << endl;
            if (sei[u] >= X)
            {
                count++;
            }
        }
        if (count == M)
        {
            min1 = min(min1, sei[0]);
        }
    }
    if (min1 == INT_MAX)
        cout << -1 << endl;
    else 
        cout << min1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: 'INT_MAX' was not declared in this scope
   15 |     long long int min1 = INT_MAX;
      |                          ^~~~~~~
a.cc:9:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    8 | #include <algorithm>
  +++ |+#include <climits>
    9 | #include <string>
Language: C++

#include<bits/stdc++.h>

using namespace std;
using ll = long long;
const long long INF = 1LL<<60;

int main(){

ll N,M,X;
ll tot = 0;
ll ans = INF;


cin >> N >> M >> X;

vector<ll> a(M);
vector<ll> C(N);
vector<vector<ll>> A(N,vector<ll>(M));

for(ll i = 0;i < N;++i){
    cin >> C[i];
    for(ll j = 0;j < M;++j) cin >> A[i][j];
}

vector<ll> v;

for(ll i = 0; i < N;++i) v.push_back(i);

do{

    tot = 0;
    for(ll i = 0; i < M;++i) a[i] = 0;

    for(ll i = 0; i < N;++i){

        bool flg = true;

        tot = tot + C[v[i]];

        for(ll j = 0; j < M;++j){
            
            a[j] += A[v[i]][j];

            if(a[j] < X){
                flg = false;
            

        }

        if(flg){
            ans = std::min(ans,tot);
            break;
        }

    }

}while(next_permutation(v.begin(),v.end()));

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

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:64:2: error: expected 'while' at end of input
   64 | }
      |  ^
a.cc:64:2: error: expected '(' at end of input
   64 | }
      |  ^
      |  (
a.cc:64:2: error: expected primary-expression at end of input
a.cc:64:2: error: expected ')' at end of input
   64 | }
      |  ^
      |  )
a.cc:64:2: error: expected ';' at end of input
   64 | }
      |  ^
      |  ;
a.cc:64:2: error: expected '}' at end of input
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: Java

import java.util.Scanner;

public class C {
  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 < m; j++) {
        a[i][j] = sc.nextInt();
      }
    }

    final int INIT_NUM = 10000000;
    int cost = INIT_NUM;
    for (int i = 0; i < (int) Math.pow(2, n); i++) {
      int bin_i = i;
      int[] rikaido = new int[m];
      int total = 0;
      int pos = 0;

      for (int j = 0; j < n; j++) {
        if ((bin_i & 1) == 0) {
          bin_i >>= 1;
          pos++;
          continue;
        }

        total += c[pos];
        for (int k = 0; k < m; k++) {
          rikaido[k] += a[pos][k];
        }
        bin_i >>= 1;
        pos++;
      }

      if (checkRikaido(rikaido, x)) {
        cost = Math.min(cost, total);
      }
    }

    System.out.println(cost != INIT_NUM ? cost : "-1");
  }

  private static boolean checkRikaido(int[] rikaido, int ikichi) {
    for (int i : rikaido) {
      if (i < ikichi) return false;
    }

    return true;
  }
}


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++

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

const int INF = 1001001001;
int a[12][12];

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];
	}

	rep(s,1<<N){
		int cost = 0;
		vector<int> d(m);
		rep(i,n){
			if (s>>i & 1){////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;
	return 0;
}

Compiler output:
a.cc:4:11: error: 'pair' does not name a type
    4 | using P = pair<int,int>;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:2:18: error: expected ',' or ';' before 'for'
    2 | #define rep(i,n) for (int i=0;i<n;i++)
      |                  ^~~
a.cc:14:9: note: in expansion of macro 'rep'
   14 |         rep(i,n){
      |         ^~~
a.cc:14:13: error: 'i' was not declared in this scope
   14 |         rep(i,n){
      |             ^
a.cc:2:31: note: in definition of macro 'rep'
    2 | #define rep(i,n) for (int i=0;i<n;i++)
      |                               ^
a.cc:19:18: error: 'N' was not declared in this scope
   19 |         rep(s,1<<N){
      |                  ^
a.cc:2:33: note: in definition of macro 'rep'
    2 | #define rep(i,n) for (int i=0;i<n;i++)
      |                                 ^
a.cc:30:24: error: 'ans' was not declared in this scope; did you mean 'abs'?
   30 |                 if(ok) ans =min(ans ,cost);
      |                        ^~~
      |                        abs
a.cc:32:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   32 |         if (ans == INF) cout << -1 << endl;
      |             ^~~
      |             abs
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;

int a[12][12];

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(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;
}

Compiler output:
a.cc:4:12: error: 'Long' does not name a type; did you mean 'long'?
    4 | using ll = Long Long;
      |            ^~~~
      |            long
Language: C

#include <iostream>
#include <vector>
#include <cmath>
#include <bitset>
 
using namespace std;
using ll = long long;

int main(int argc, const char * argv[]) {
    
    int N, M, X;
    cin >> N >> M >> X;
    
    vector<int> c(N, 0);
    vector<int> money;
    int** A = new int*[N];
    
    for(int i=0; i<N; i++){
        cin >> c[i];
        A[i] = new int[M];
        for(int j=0; j<M; j++){
            cin >> A[i][j];
        }
    }
    
    
    for(int tmp=0; tmp < (1 << 12); tmp++){
        bitset<12> s(tmp);
    
        int m=0;
        vector<int> skill(M,0);
        for(int i=0; i<12; i++){
            if(i>=N) continue;
            if(s.test(i)==1){
                for(int j=0; j<M; j++){
                    skill[j]+=A[i][j];
                }
                m += c[i];
            }
        }
        
        int count=0;
        for(int i=0; i<M; i++){
            if(skill[i]>=X){
                count+=1;
            }
        }
        
        if(count>=M){
            money.push_back(m);
        }
    }
    
    if(money.size() > 0){
        int ans=100000;
        for(int i=0; i<money.size(); i++){
            ans=min(ans, money[i]);
        }
        cout << ans << endl;
    }else{
        cout << "-1" << endl;
    }
    
    for(int i=0; i<N; i++){
        delete A[i];
    }
    delete[] A;
    
    return 0;
}


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

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

def combinations():
	from itertools import product
	
	for i in product([0, 1], repeat = n):
		lst = []
		for j in range(n):
			if i[j] == 1:
				lst.append(books[j])
		yield lst

ans = 10**9
for books_bought in combinations():
	level = [0]*m
	cost = 0
	for book in books_bought:
		cost += book[0]
		for i in range(m):
			level[i] += book[i + 1]
		
	for num in level:
		if num < x:
			break
	else:
		ans = min(ans, cost)

if ans == 10**9:
	print (-1)
else:
	print (ans)		

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n, m, x = map(int, input().split())
      | ^