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

#include <iostream>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <float.h>
#include <stdlib.h>
#include <functional>
#include <limits>
#include <numeric>
#include <type_traits>
#include <queue>
#include <fstream>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i <= (int)(n); i++)
#define sort1(v) sort(v.begin(),v.end())
#define reverse(v) reverse(v.begin(),v.end())
#define all(v) v.begin(),v.end()
typedef long long ll;
typedef pair<int,int> p;
bool paircom (pair<int,int> p,pair<int,int> q){
return p.second<q.second;
}

void count(vector<int> v,vector<int>& ans){
    sort1(v);
    int n=v.size();
  int k=1;
  int i=1;
  bool bl=true;
    while(true){
    while(bl){
        if(v[i-1]==v[i]){
        k++;    
      }else{
          bl=false;
      }
      i++;
      }
      ans.push_back(k);
      if(i>=(n-1))break;
      k=1;
      bl=true;
    }
    }




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;
vector<int> r(m);
fill(r.begin(),r.end(),-1);
vector<int> ansc;
    for (int bit = 0; bit < (1<<n); ++bit) {
        bitset<12> s(bit);
 
    int sum = 0;
    int bef;
    for (int i = 0; i <n; i++) {
      if (s.test(i)) {
        sum += c.at(i);
        for(int j=0;j<m;j++){
            if(r[j]==-1)r[j]=0;
            r[j]=r[j]+a[i][j];
        }
      }
    }


    bool bl=true;
    for(int l=0;l<m;l++){
        if(r[l]<x)bl=false;
    }
//cout<<sum<<endl;
    if(bl)ansc.push_back(sum);
    sum=0;
    fill(r.begin(),r.end(),-1);
    bl=true;


        
    }
    if(ansc.size()!=0)sort1(ansc);
    if(ansc[0]==0){cout << -1;}else{
cout << ansc[0];
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:9: error: 'bitset' was not declared in this scope
   67 |         bitset<12> s(bit);
      |         ^~~~~~
a.cc:14:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
   13 | #include <fstream>
  +++ |+#include <bitset>
   14 | using namespace std;
a.cc:67:20: error: 's' was not declared in this scope
   67 |         bitset<12> s(bit);
      |                    ^
Language: C++

#include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <iomanip>
#include <numeric>
using namespace std;

int main() {
    int n, m, x;
    cin >> n >> m >> x;
    int res = -1;

    int types = pow(2, n);
    vector<vector<int>> v;
    vector<int> p;
    for (int i = 0; i < n; i++) {
        int price;
        cin >> price;
        p.push_back(price);
        vector<int> vv;
        for (int j = 0; j < m; j++) {
            int t;
            cin >> t;
            vv.push_back(t);
        }
        v.push_back(vv);
    }
    for (int i = 0; i < types; i++) {
        int price = 0;
        vector<int> state(m, 0);
        int index = i;
        for (int j = 0; j < n; j++) {
            if (index % 2 == 1) {
                for (int k = 0; k < m; k++) {
                    state[k] += v[j][k];
                }
                price += p[j];
            }
            index /= 2;
        }
        int flag = 1;
        for (int j = 0; j < m; j++) {
            if (state[j] < x) {
                flag = 0;
                break;
            }
        }
        if (flag == 1) {
            if (res == -1 || res > price) {
                res = price;
            }
        }
    }
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'pow' was not declared in this scope
   15 |     int types = pow(2, n);
      |                 ^~~
Language: C++

#include <iostream>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <algorithm>
#include <numeric>
#include <queue>
#include <vector>
#include <cmath>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <set>
#include <map>
#include <stack>

using namespace std;

template<class T> inline bool chmin(T& a, T b) {if (a > b) { a=b; return true; } return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) { a=b; return true; } return false;}

typedef long long LL;
typedef pair<int, int> PII;
typedef vector<int> VI;

#define all(x) (x).begin(), (x).end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repl(i, n) for(LL i = 0; i < (LL)(n); i++)

int n, m, x;
bool found = false;

bool comp(vector<int> a, vector<int> b) {
  return a[0] < b[0];
}

int main(void){
  cin >> n >> m >> x;
  vector<vector<int>> vec(n, vector<int>(m+1, 0));

  rep(i, n) {
    cin >> vec[i][0];
    rep(j, m) {
      cin >> vec[i][j+1];
    }
  }

  sort(vec.begin(), vec.end(), comp);

  int min_total = INT_MAX;

  rep(i, pow(2, n)) {
    int total = 0;
    string b = bitset<12>(i).to_string();
    vector<int> skill(m, 0);

    rep(j, n) {
      vector<int> book = vec[k];
      if (b[11 - k] == '1') {
        rep(j, m) {
          skill[j] += book[j+1];
        }
        price += book[0];
      };
    }

    found = true;
    rep(k, m) {
      if (skill[j] < x) {
        found = false;
      }
    }

    if (found && (price < best_price)) {
      best_price = price;
    }
  }

  if (best_price == INT_MAX) {
    cout << "-1";
  } else {
    cout << best_price;
  }

  return 0;
};

Compiler output:
a.cc: In function 'int main()':
a.cc:59:30: error: 'k' was not declared in this scope
   59 |       vector<int> book = vec[k];
      |                              ^
a.cc:64:9: error: 'price' was not declared in this scope
   64 |         price += book[0];
      |         ^~~~~
a.cc:70:17: error: 'j' was not declared in this scope
   70 |       if (skill[j] < x) {
      |                 ^
a.cc:75:19: error: 'price' was not declared in this scope
   75 |     if (found && (price < best_price)) {
      |                   ^~~~~
a.cc:75:27: error: 'best_price' was not declared in this scope
   75 |     if (found && (price < best_price)) {
      |                           ^~~~~~~~~~
a.cc:80:7: error: 'best_price' was not declared in this scope
   80 |   if (best_price == INT_MAX) {
      |       ^~~~~~~~~~
Language: C++

#include <cstdio>
#include <iostream>
#include <cstdlib>
#include <unordered_map>
#include <map>
#include <unordered_set>
#include <set>
#include <vector>
#include <string>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <list>
#include <array>
#include <deque>
#include <bitset>
typedef long long ll;
using namespace std;
#define trace(x) cerr << #x << " is " << x << endl;


int helper(vector<vector<int>> A, int x) {
    int n = A.size();
    int m = A[0].size() - 1;
    int res = INT_MAX;
    for (int i = 1; i < (1 << n); i++) {
        int cost = 0;
        vector<int> cur (m + 1, 0);
        for (int j = 0; j < n; j++) {
            if ((1 << j) & i) {
                for(int k = 1; k <= m; k++) {
                    cur[k] += A[j][k];
                }
                cost += A[j][0];
            }
        }
        int flag = 1;
        for (int j = 1; j <= m; j++) {
            if(cur[j] < x) {
                flag = false;
                break;
            }
        }
        if (flag) {
            res = min(res, cost);
        }
    }
    if (res == INT_MAX) return -1;
    return res;
}

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

    int n, m, x;
    cin >> n >> m >> x;
    vector<vector<int>> A(n, vector<int>(m + 1));
    for (int i = 0; i < n; i++) {
        for (int j = 0; j <= m; j++) {
            cin >> A[i][j];
        }
    }
    cout << helper(A, x) <<endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int helper(std::vector<std::vector<int> >, int)':
a.cc:28:15: error: 'INT_MAX' was not declared in this scope
   28 |     int res = INT_MAX;
      |               ^~~~~~~
a.cc:20:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   19 | #include <bitset>
  +++ |+#include <climits>
   20 | typedef long long ll;
Language: C++

#include<iostream>

using namespace std;


int main() {
	int n, m, x;
	int c[12];
	int a[12][12];
	int i, j, k;
	
	int knowledge[12] = { 0 };

	int buy_bool[12];

	int expo_n, i_tmp, price_sum, price_min = -1;

	bool archive_flg = true;


	cin >> n >> m >> x;

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

	expo_n = std::pow(2, n);

	for (i = 0; i < expo_n ; i++) {
		i_tmp = i;
		for (j = 0; j < n; j++) {
			buy_bool[j] = 0;
			buy_bool[j] = i_tmp % 2;
			i_tmp /= 2;
		}
		price_sum = 0;
		for (j = 0; j < n; j++) {
			if (buy_bool[j] != 0) price_sum += c[j];
		}
		if (price_min == -1 || price_sum < price_min) {
			for (j = 0; j < n; j++) knowledge[j];
			if (buy_bool[i] != 0) {
				for (k = 0; k < m; k++) knowledge[j] += a[j][k];
			}
		}
		archive_flg = true;
		for (j = 0; j < n; j < n) {
			if (knowledge[j] < x) {
				archive_flg = false;
				break;
			}
		}
		if (archive_flg) price_min = price_sum;
	}


	cout << price_min << endl;


	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:28:23: error: 'pow' is not a member of 'std'
   28 |         expo_n = std::pow(2, n);
      |                       ^~~
Language: C++

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

int main(){
	int N,M , X; cin >> N >> M >> X;
  	vector<vector<int>> book (N,vector<int>(M+1));
  	for(int i=0; i<N ; i++){
    	for(int j=0; j<M+1 ; j++){
        	cin >> book.at(i).at(j);
        }
    }
  	
  	bool kaiaru =false;
  	int kai=0;
  	static const int n = N;
  	
  	for(int tmp=0; tmp <(1 << n); tmp++){
      	bitset<12> s(tmp);
      	vector<int> skill(M,0);
      	int money=0;
    	for(int i=0; i<n ; i++){
        	if(flag.test(i)){
            	for(int j=0; j<M;j++){
                	skill[j]+=book[i][j+1];
                }
              	money+=book[i][0];
              	
            }
        }
      	for(int i=0; i<M; i++){
        	if(skill[i] < X){break;}
          	else if(i == M-1){
              kaiaru = true;
              if(money < kai){kai = money;}
            }
        }
    }
  	if(kaiaru){cout << kai << endl;}
  	else{cout << -1 << endl;}
  	
  	
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: 'flag' was not declared in this scope
   22 |                 if(flag.test(i)){
      |                    ^~~~
Language: C++

#include<iostream>
#define ll long long
#include<algorithm>
#include<string>
#include<vector>
#include<unordered_set>
#include <iomanip>
using namespace std;
ll dp[14][14] = {0};
ll ans = INT_MAX;



void add(int temp[], int m, int i)
{
    for(int j=0; j<m; ++j)
    {
        temp[j] += dp[i][j+1];
    }

}


void subtract(int temp[], int m, int i)
{
    for(int j=0; j<m; ++j)
    {
        temp[j] -= dp[i][j+1];
    }

}

void check(int current_index, int x, int n, int m, int temp[], int current_cost)
{
    bool yes = 1;
    for(int i=0; i<m; ++i)
    {
        if(temp[i] < x)
        {
            yes = 0;
            break;
        }
    }
    if(yes)
    {
        ans = min(ans, (ll)current_cost);
        return ;
    }
    for(int i=current_index; i<n; ++i)
    {
        add(temp, m, i);
        check(i+1, x, n, m, temp, current_cost + dp[i][0]);
        subtract(temp, m, i);
    }
}


int main()
{

    ll n,m,x;
    cin>>n>>m>>x;
    int temp[m] = {0};

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

    check(0, x, n, m, temp, 0);


    if(ans == INT_MAX)
    {
        cout<<-1;
    }
    else
    {
        cout<<ans;
    }
    return 0;
}


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

#include<iostream>

using namespace std;


int main() {
	int n, m, x;
	int c[12];
	int a[12][12];
	int i, j, k;
	
	int knowledge[12] = { 0 };

	int buy_bool[12];

	int expo_n, i_tmp, price_sum, price_min = -1;

	bool archive_flg = true;


	cin >> n >> m >> x;

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

	expo_n = pow(2, n);

	for (i = 0; i < expo_n ; i++) {
		i_tmp = i;
		for (j = 0; j < n; j++) {
			buy_bool[j] = 0;
			buy_bool[j] = i_tmp % 2;
			i_tmp /= 2;
		}
		price_sum = 0;
		for (j = 0; j < n; j++) {
			if (buy_bool[j] != 0) price_sum += c[j];
		}
		if (price_min == -1 || price_sum < price_min) {
			for (j = 0; j < n; j++) knowledge[j];
			if (buy_bool[i] != 0) {
				for (k = 0; k < m; k++) knowledge[j] += a[j][k];
			}
		}
		archive_flg = true;
		for (j = 0; j < n; j < n) {
			if (knowledge[j] < x) {
				archive_flg = false;
				break;
			}
		}
		if (archive_flg) price_min = price_sum;
	}


	cout << price_min << endl;


	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:28:18: error: 'pow' was not declared in this scope
   28 |         expo_n = pow(2, n);
      |                  ^~~
Language: C++

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

int main(){
  ll N,M,X;
  cin >> N >> M >> X;
  vector<ll> C(N);
  vector<vector<ll>> A(N,vector<ll>(M));
  rep(i,N){
    cin >> C.at(i);
    rep(j,M){
      cin >> A.at(i).at(j);
    }
  }
  vector<ll> B(N);
  rep(j,M){
    for(int mask=0;mask<(1<<N);++mask){
      ll num=0,y=0,ans=INF;
      rep(i,N){
        if(mask & (1<<i)){
          num += C.at(i);
          y += A.at(i).at(j);
        }
      }
      if(y>=X){
        ans = min(ans,num);
      }
    }
    B.at(j) = ans;
  }
  sort(B.begin(),B.end());
  if(B.at(N-1)==INF){
    cout << "-1" << endl;
  }else{
    cout << B.at(N-1) << endl;
  }
}


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

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

int main(){
  int N,M,X;
  cin >> N >> M >> X;
  vector<vector<int>> data(N,M+1)
    for (int i=0 ; i<N;i++){
      for (int j=0; j<M+1; j++){
        cin>> data.at(i).at(j)
      }
    }
  int sum=0;
  for (int i=1 ; i < N ; i++){
    for(int j=0; j<M+1;j++){
      sum+=data.at(i).at(j);
    }
    if(sum < X ) {
      cout <<  -1 << endl;
      break;
    }
    sum=0
  }
  
    
  

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

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

int main(){
	int N,M , X; cin >> N >> M >> X;
  	vector<vector<int>> book (N,vector<int>(M+1));
  	for(int i=0; i<N ; i++){
    	for(int j=0; j<M+1 ; j++){
        	cin >> book.at(i).at(j);
        }
    }
  	
  	bool kaiaru =false;
  	int kai=0;
  	static const int n = N;
  	
  	for(int tmp=0; tmp <(1 << n); tmp++){
      	bitset<n> s(tmp);
      	vector<int> skill(M,0);
      	int money=0;
    	for(int i=1; i<=n ; i++){
        	if(flag[i]){
            	for(int j=0; j<M;j++){
                	skill[j]+=book[i-1][j+1];
                }
              	money+=book[i][0];
              	
            }
        }
      	for(int i=0; i<M; i++){
        	if(skill[i] < X){break;}
          	else if(i == M-1){
              kaiaru = true;
              if(money < kai){kai = money;}
            }
        }
    }
  	if(kaiaru){cout << kai << endl;}
  	else{cout << -1 << endl;}
  	
  	
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: the value of 'n' is not usable in a constant expression
   18 |         bitset<n> s(tmp);
      |                 ^
a.cc:15:26: note: 'n' was not initialized with a constant expression
   15 |         static const int n = N;
      |                          ^
a.cc:18:17: note: in template argument for type 'long unsigned int'
   18 |         bitset<n> s(tmp);
      |                 ^
a.cc:22:20: error: 'flag' was not declared in this scope
   22 |                 if(flag[i]){
      |                    ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
using ll = long long;
using ll INF = 1e18;
int main(){
  int n,m,x,w,maxsum=0;
  cin>>n>>m>>x;
  vector<int> c(n);
  int a[n][m];
  rep(i,n){
   cin>>c[i]; maxsum += c[i];
   w=i;
   rep(j,m){
    cin>>a[w][j];
   }
  }
  ll dp[m][n-1];
  int k=0;
  rep(i,m){
   w=i;
   rep(j,n){
    k += a[j][w];
   }
   if(k<x){
     cout<<-1<<endl;
     return 0;
   }
  }
  
}

Compiler output:
a.cc:5:7: error: expected nested-name-specifier before 'll'
    5 | using ll INF = 1e18;
      |       ^~
Language: C++

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

int main() {
	int n,m,x;
	cin>>n>>m>>x;
	vector<int>cost(n);
	vector<vector<int>>algo(n,vector<int>(m));
	vector<vector<int>>s;

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

    for(int i=0;i<n;i++)
    {
    	for(int p=1;p<=n;p++)
    	{  
    		vector<int>temp(m+1);
    	for(int j=0;j<m;j++)
    	{   int sum=0;int c=0;
    		for(int k=i;k<p;k++)
    		{
    		    sum+=algo[k][j];
    		    c+=cost[k];
    		    
    		}
    		temp[0] = c;
    		temp[j+1] = sum;
    	}
    	s.push_back(temp);
    	}
    }
    sort(s.begin(),s.end());
    int j,ans=0;
    unsigned long long n = s.size();
    for(unsigned long long i =0;i<n;i++)
    {
    	for(j=1;j<=m;j++)
    	{
    		if(s[i][j]<x)break;
    		
    	}
    	if(j==m+1)
    	{
    		ans = s[i][0];
    		break;
    	}
    }
    cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:24: error: conflicting declaration 'long long unsigned int n'
   40 |     unsigned long long n = s.size();
      |                        ^
a.cc:5:13: note: previous declaration as 'int n'
    5 |         int n,m,x;
      |             ^
Language: C

#include <stdio.h>

typedef ll long long;

int main(void) {
  int n, m, x;
  scanf("%d%d%d", &n, &m, &x);
  ll c[13] = {0};
  ll a[13][13] = {0};
  //ll dp[13][13] = {0};
  for(int i = 1;i <= n;i++) {
    scanf("%lld", c + i);
    for(int j = 1;j <= m;j++) {
      scanf("%lld", &a[i][j]);
      a[i][j] += a[i-1][j];
    }
  }
  ll ret = 0;
  for(int i = 1;i <= n;i++) {
    for(int j = i;j <= n;j++) {
      int flag = 1;
      for(int k = 1;i <= m;k++) {
        if(a[j][k] - a[i][k] < x) {
          flag = 0;
        }
      }
      if(flag) {
        if(ret > c[j] - c[i]) {
          ret = c[j] - c[i];
        }
      }
    }
  }
  printf("%lld\n", ret);
  return 0;
}


Compiler output:
main.c:3:11: error: expected ';' before 'long'
    3 | typedef ll long long;
      |           ^~~~~
      |           ;
main.c:3:1: warning: useless type name in empty declaration
    3 | typedef ll long long;
      | ^~~~~~~
main.c: In function 'main':
main.c:8:3: error: unknown type name 'll'
    8 |   ll c[13] = {0};
      |   ^~
main.c:9:3: error: unknown type name 'll'
    9 |   ll a[13][13] = {0};
      |   ^~
main.c:18:3: error: unknown type name 'll'
   18 |   ll ret = 0;
      |   ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  long long int N,M,X;
  cin>>N>>M>>X;
  long long int C[N]={0};
  int A[N][M]={0}
  long long int answer=0;
 
    for(int i=0;i<N;i++){
      
    }
    cout<<answer<<endl;
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'long'
    8 |   long long int answer=0;
      |   ^~~~
a.cc:13:11: error: 'answer' was not declared in this scope
   13 |     cout<<answer<<endl;
      |           ^~~~~~
Language: C++

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

int main(){
	int N,M , X; cin >> N >> M >> X;
  	vector<vector<int>> book (N,vector<int>(M+1));
  	for(int i=0; i<N ; i++){
    	for(int j=0; j<M+1 ; j++){
        	cin >> book.at(i).at(j);
        }
    }
  	
  	bool kaiaru =false;
  	int kai=0;
  	const int n = N;
  	
  	for(bitset<n> flag = 0 ; flag <= pow(2,n+1)-1 ; flag++){
      	vector<int> skill(M,0);
      	int money=0;
    	for(int i=1; i<=n ; i++){
        	if(flag[i]){
            	for(int j=0; j<M;j++){
                	skill[j]+=book[i-1][j+1]
                }
              	money+=book[i][0];
              	
            }
        }
      	for(int i=0; i<M; i++){
        	if(skill[i] < X){break;}
          	else if(i == M-1){
              kaiaru = true;
              if(money < kai){kai = money;}
            }
        }
    }
  	if(kaiaru){cout << money << endl;}
  	else{cout << -1 << endl;}
  	
  	
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: the value of 'n' is not usable in a constant expression
   17 |         for(bitset<n> flag = 0 ; flag <= pow(2,n+1)-1 ; flag++){
      |                     ^
a.cc:15:19: note: 'n' was not initialized with a constant expression
   15 |         const int n = N;
      |                   ^
a.cc:17:21: note: in template argument for type 'long unsigned int'
   17 |         for(bitset<n> flag = 0 ; flag <= pow(2,n+1)-1 ; flag++){
      |                     ^
a.cc:21:24: error: invalid types 'int[int]' for array subscript
   21 |                 if(flag[i]){
      |                        ^
a.cc:23:49: error: expected ';' before '}' token
   23 |                         skill[j]+=book[i-1][j+1]
      |                                                 ^
      |                                                 ;
   24 |                 }
      |                 ~                                
a.cc:37:28: error: 'money' was not declared in this scope
   37 |         if(kaiaru){cout << money << endl;}
      |                            ^~~~~
Language: C++

#include<bits/stdc++.h>
#include<string>
using namespace std;
int x;
int find(vector<vector<int> > ans,vector<int> V,int s){
	if(s>ans.size())
	 return -1;
	int cnt=INT_MAX;
	int flag=0;
	for(int i=0;i<V.size();i++){
		if(V[i]<x)
		  flag=1;
	}
	if(flag==0)
	 return 0;
	if(s==ans.size())
	 return -1;
	for(int i=s;i<ans.size();i++){
		vector<int> temp=V;
		for(int j=1;j<ans[0].size();j++){
			temp[j-1]+=ans[i][j];
		}
		int cost=find(ans,temp,i+1);
		if(cost==-1)
		continue;
		if(cost>=0)
		cnt=min(cnt,cost+ans[i][0]);
	}
	return cost==INT_MAX?-1:cost;
}
int main(){
int n,m;
cin>>n>>m>>x;
vector<vector<int> > matrix(n,vector<int> (m+1,0));
for(int i=0;i<n;i++){
	for(int j=0;j<=m;j++){
		cin>>matrix[i][j];
	}
}
vector<int> V(m,0);
cout<<findSum(matrix,V,0)<<" ";
}


Compiler output:
a.cc: In function 'int find(std::vector<std::vector<int> >, std::vector<int>, int)':
a.cc:29:16: error: 'cost' was not declared in this scope; did you mean 'cosl'?
   29 |         return cost==INT_MAX?-1:cost;
      |                ^~~~
      |                cosl
a.cc: In function 'int main()':
a.cc:41:7: error: 'findSum' was not declared in this scope
   41 | cout<<findSum(matrix,V,0)<<" ";
      |       ^~~~~~~
Language: C++

#include<bits/stdc++.h>
#define INF 2000000000
#define MOD 1000000007
#define EPS (1e-10)

using namespace std;

string binary(int num) {
	int tmp = 0;
	for (int i = 0; 0 < num; i++) {
		tmp = tmp + (num % 2) * pow(10,i);
		num /= 2;
	}
	string ret = to_string(tmp);

	return to_string(tmp);
}

int main(int argc, char *argv[]) {
	
	int N,M,X; cin >> N >> M >> X;

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

	for (int i = 0; i < M; i++) {
		if (check[i] < X) {
			cout << -1 << endl;	
			return 0;
		}
	}

	int ans = INF;
	for (int i = 0; i < (1<<N); i++) {
		string bin = binary(i);
		while(bin.size() < N) {
			bin = '0' + bin;
		}
		vector<int> Asum(M,0);
		int mini = INF;
		int sum = 0;
		//cout << "bin " << bin << endl;
		for (int j = 0; j < N; j++) {
			if (bin[j] == '1') {
				//cout << "j = " << j << endl;
				sum += cost[j];				
				for (int k = 0; k < M; k++) {
					Asum[k] += A[j][k];
				}
			}
		}
		for (int k = 0; k < M; k++) {
			if (Asum[k] < X) {
				sum = INF;
			}
		}
		ans = min(ans, sum);
	}
	out << ans	<< endl;


	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:67:9: error: 'out' was not declared in this scope
   67 |         out << ans      << endl;
      |         ^~~
Language: C++

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

int main() {
	int n,m,x;
	cin >> n >> m >> x;
	vector<int> c(n,0);
	vector<vector<int>> a(n,vector<int> (m,0));
	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 s = 10000000;
	for(int i=0;i<=pow(2,n);i++)
	{
		vector<int> d(m,0);
		int cc=0;
		for(int j=0;j<n;j++)
		{
			if(i % pow(2,j+1) >= pow(2,j) )
			{
				for(int l=0;l<m;l++)
				{
					d.at(l)+=a.at(j).at(l);
					cc+=c.at(j);
				}
			}
		}
		int h=0;
		for(int j=0;j<m;j++)
		{
			if(d.at(j)<x)
			{
				h=1;
			}
		}
		if(h==0)
		{
			s = min(s,cc);
		}
	}
	if(s == 10000000)
	{
		s = -1;
	}
	cout << s << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:30: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   24 |                         if(i % pow(2,j+1) >= pow(2,j) )
      |                            ~ ^ ~~~~~~~~~~
      |                            |      |
      |                            int    __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

int main(){
	int n, m, x;
	cin >> n >> m >> x;
	int c[n][m+1];
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m+1;j++){
			cin >> c[i][j];
		}
		int a=0;
	} 
	for(int i=0;i<=n;i++){
		i++;
		i++;
		for(int j=0;j<=x;j++){
			c[i][j]+=x;
			if(xfd){
				cout << z;
			}
			for(int p=0;p<=x;p++){
				for(dfsdfs){
					for(ds;fla){
						cout << aaa;
					}
				}
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: 'xfd' was not declared in this scope
   19 |                         if(xfd){
      |                            ^~~
a.cc:20:41: error: 'z' was not declared in this scope
   20 |                                 cout << z;
      |                                         ^
a.cc:23:37: error: 'dfsdfs' was not declared in this scope
   23 |                                 for(dfsdfs){
      |                                     ^~~~~~
a.cc:28:25: error: expected primary-expression before '}' token
   28 |                         }
      |                         ^
a.cc:27:34: error: expected ';' before '}' token
   27 |                                 }
      |                                  ^
      |                                  ;
   28 |                         }
      |                         ~         
a.cc:28:25: error: expected primary-expression before '}' token
   28 |                         }
      |                         ^
a.cc:27:34: error: expected ')' before '}' token
   27 |                                 }
      |                                  ^
      |                                  )
   28 |                         }
      |                         ~         
a.cc:23:36: note: to match this '('
   23 |                                 for(dfsdfs){
      |                                    ^
a.cc:28:25: error: expected primary-expression before '}' token
   28 |                         }
      |                         ^
Language: Java

import java.util.Scanner;
public class MainC{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt(); // sankousyo
    int M = sc.nextInt(); // algori
    int X = sc.nextInt(); // 理解度
    int[] yen = new int[N]; // yen
    int[][] ji = new int[N][M]; // 実力
    for(int i=0; i<N ;i++){
      yen[i] = sc.nextInt(); 
      for(int j=0; j<M ;j++){
        ji[i][j] = sc.nextInt(); 
      }
    }
    int min = Integer.MAX_VALUE;
    for(int i = 0 ; i < Math.pow(2,N) ; i++) {
      int[] aa = new int[N];
      int sum = 0;
      for(int j = 0 ; j < N ; j++) {
        if((1 & (i>>j)) == 1) {
          sum += yen[j];
          for(int k =0; k<M ; k++){
            aa[k] += ji[j][k];
          }
        }
        boolean bf = true;
        for(int l =0; l<M ; l++){
          if(aa[l]<X){
            bf = false;
          }
        }
        if(bf==true){min = Math.min(min, sum);}
      }
    }
    if(min==Integer.MAX_VALUE){
      System.out.println(-1); 
    }else{
      System.out.println(min); 
    }
  }

}





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

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

int main() {
	int n,m,x;
	cin >> n >> m >> x;
	vector<int> c(n,0);
	vector<vector<int>> a(n,vector<int> (m,0));
	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 s = 10000000;
	for(int i=0;i<=pow(2,n);i++)
	{
		vector<int> d(m,0);
		int cc=0;
		for(int j=0;j<n;j++)
		{
			if(i % (pow(2,j+1) >= pow(2,j) )
			{
				for(int l=0;l<m;l++)
				{
					d.at(l)+=a.at(j).at(l);
					cc+=c.at(j);
				}
			}
		}
		int h=0;
		for(int j=0;j<m;j++)
		{
			if(d.at(j)<x)
			{
				h=1;
			}
		}
		if(h==0)
		{
			s = min(s,cc);
		}
	}
	if(s == 10000000)
	{
		s = -1;
	}
	cout << s << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:57: error: expected ')' before '{' token
   24 |                         if(i % (pow(2,j+1) >= pow(2,j) )
      |                           ~                             ^
      |                                                         )
   25 |                         {
      |                         ~                                
a.cc:32:17: error: expected primary-expression before '}' token
   32 |                 }
      |                 ^
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));//NxMの配列
  vector<int> rikai(M,0);//理解度
  
  // 入力
  for(int i =0;i<N;i++){
    cin >> C.at(i);
    for(int j =0;j<M;j++){
      cinA.at(i).at(j);
    }
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'cinA' was not declared in this scope
   15 |       cinA.at(i).at(j);
      |       ^~~~
a.cc:17:4: error: expected '}' at end of input
   17 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

import java.io.*;
import java.util.*;

class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        String s[]=bu.readLine().split(" ");
        int n=Integer.parseInt(s[0]),m=Integer.parseInt(s[1]),x=Integer.parseInt(s[2]);
        int i,c[][]=new int[n][m+2],sum[]=new int[m],tot=0,j;
        for(i=0;i<n;i++)
        {
            s=bu.readLine().split(" ");
            int v=0;
            for(j=0;j<=m;j++)
            {
                c[i][j]=Integer.parseInt(s[j]);
                if(j!=0) {v+=c[i][j];sum[j-1]+=c[i][j];}
            }
            tot+=c[i][0];
            c[i][m+1]=v;
        }
        int flag=0;
        for(i=0;i<m;i++)
            if(sum[i]<x) {flag=1; break;}
        if(flag==1) {System.out.print("-1"); return;}

        Arrays.sort(c,new Comparator<int[]>(){
            public int compare(int e1[],int e2[])
            {
                if(e1[0]>e2[0]) return 1;
                else if(e1[0]==e2[0])
                {
                    if(e1[m+1]<=e2[m+1]) return 1;
                    else return -1;
                }
                else return -1;
            }});

        for(i=n-1;i>=0;i--)
        {
            flag=0;
            for(j=0;j<m;j++)
                if(sum[j]-c[i][j+1]<x) {flag=1; break;}
            if(flag==0 && tot-c[i]>0)
            {
                tot-=c[i][0];
                for(j=0;j<m;j++)
                    sum[j]-=c[i][j+1];
            }
        }
        System.out.print(tot);
    }
}


Compiler output:
Main.java:46: error: bad operand types for binary operator '-'
            if(flag==0 && tot-c[i]>0)
                             ^
  first type:  int
  second type: int[]
1 error
Language: C++

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

int main() {
  int n, m, x;
  cin >> n >> m >> x;
  vector<int> costs(n+1);
  vector<vector<int>> rec(n+1, vector<int>(m+1));
  for (int i = 1; i <= n; ++i) {
    int c;
    cin >> c;
    costs[i] = c;
    for (int j = 1; j <= m; ++j) {
      int d;
      cin >> d;
      rec[i][j] = d;
    }
  }
  int limit = 1 << n;
  int mn = INT_MAX;
  vector<int> algs(m, 0);
  for (int v = 1; v < limit; v++) {
    int cost = 0;
    fill(algs.begin(), algs.end(), 0);
    for (int i = 0; i < n; i++) {
      if(v & (1 << i)) {
        cost += costs[i+1];
        for (int j = 1; j <= m; ++j) {
          algs[j-1] += rec[i+1][j];
        }
      }
    }
    bool cando = true;
    for(int j = 0; j < m; ++j) {
      if (algs[j] < x) {
        cando=false;
        break;
      }
    }
    if (cando) mn = min(mn, cost);
  }
  if (mn == INT_MAX) cout << -1 << endl;
  else cout << mn << endl;
  return 0;
}

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

#include<iostream>
#include<algorithm>
using namespace std;
struct book
{
    int c;
    int a[15];
};
book acm[15];
int n,m,x;
bool cmp(book x,book y)
{
    return x.c<y.c;
}
int solve(int s)
{
    int num=0;
    int b[15]={0};
    int key=0;
    for(int i=s;i<n;i++){
        num+=acm[i].c;
        int sum=INT_MAX;
        for(int j=0;j<m;j++){
            b[j]+=acm[i].a[j];
            sum=min(sum,b[j]);
        }
        if(sum>=x){
            key=1;
            break;
        }
        if(sum<x&&i==n-1)
            i=-1;
    }
    if(key)
        return num;
    return INT_MAX;
}
int main()
{
    cin>>n>>m>>x;
    for(int i=0;i<n;i++){
        cin>>acm[i].c;
        for(int j=0;j<m;j++)
            cin>>acm[i].a[j];
    }
    for(int i=0;i<m;i++){
        int sum=0;
        for(int j=0;j<n;j++)
            sum+=acm[j].a[i];
        if(sum<x){
            cout<<"-1"<<endl;
            return 0;
        }
    }
    sort(acm,acm+n,cmp);
    int num=INT_MAX;
    for(int i=0;i<n;i++){
        num=min(num,solve(i));
    }
    cout<<num<<endl;

}


Compiler output:
a.cc: In function 'int solve(int)':
a.cc:22:17: error: 'INT_MAX' was not declared in this scope
   22 |         int sum=INT_MAX;
      |                 ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include<algorithm>
  +++ |+#include <climits>
    3 | using namespace std;
a.cc:36:12: error: 'INT_MAX' was not declared in this scope
   36 |     return INT_MAX;
      |            ^~~~~~~
a.cc:36:12: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
a.cc: In function 'int main()':
a.cc:56:13: error: 'INT_MAX' was not declared in this scope
   56 |     int num=INT_MAX;
      |             ^~~~~~~
a.cc:56:13: 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;
typedef pair<ll, ll> PLL;
typedef vector<int> VI;
typedef vector<char> VC;
typedef vector<double> VD;
typedef vector<double> VL;
typedef vector<string> VS;
typedef vector<PLL> VP;
typedef vector<ll> VLL;
const static int INF = 1000000000;
const static int MOD = 1000000007;
#define rep(i,n) for (ll i=0; i<(ll)(n); i++)
#define repd(i,n) for (ll i=n-1; i>=0; i--)
#define rept(i,m,n) for(ll i=m; i<n; i++)
#define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define PF push_front
#define PB push_back
#define SORT(V) sort((V).begin(), (V).end())
#define RVERSE(V) reverse((V).begin(), (V).end())
#define paired make_pair
#define PRINT(V) for(auto v : (V)) cout << v << " "
//charを整数に
int ctoi(char c) { if (c >= '0' && c <= '9') { return c - '0'; } return 0; }
// 累積和 for (int i = 0; i < N; ++i) s[i+1] = s[i] + a[i]; 
void cum_sum(int N,vector<double> a, vector<double> &s){ for(int i=0; i<N; i++){ s[i+1]=s[i]+a[i];}}
//ユークリッドの控除法
ll gcd(ll a,ll b){
    if(b == 0) return a;
    return gcd(b,a%b);
}
//最小公倍数
ll lcm(ll a,ll b){
    ll g = gcd(a,b);
    return a / g * b; // Be careful not to overflow
}
//空白文字も入力 getline(cin, S);
//桁数指定 setprecision

int main()
{
    int N,M,X;
    cin >> N >> M >> X;
    VLL C(N);
    vector<vector<ll>> A(N, vector<ll>(M));
    rep(i,N){
        cin >> C[i];
        rep(j,M){
            cin >> A[i][j];
        }
    }
    vector<pair<double, double>> ave(N);
    VI memory(N);
    rep(i,N){
        long double sum=0;
        rep(j,M){
            sum+=A[i][j];
        }
        ave.at(i).F=sum/C[i];./a    
        
        ave.at(i).S=i;
    }
    bool end=true;
    ll money=0;
    sort(all(ave));
    reverse(all(ave));
    VLL judge(M);
    rep(i,N){
        rep(j,M){
            judge[j]+=A[ave[i].S][j];
            
        }
        money+=C[ave[i].S];
        rep(j,M){
            if(judge[j]<X){
                end=false;
            }
        }
        if(end){
            cout << money << endl;
            return 0;
        }
        end=true;
    }
    cout << -1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:30: error: expected primary-expression before '.' token
   63 |         ave.at(i).F=sum/C[i];./a
      |                              ^
a.cc:63:31: error: expected unqualified-id before '/' token
   63 |         ave.at(i).F=sum/C[i];./a
      |                               ^
a.cc:63:32: error: 'a' was not declared in this scope
   63 |         ave.at(i).F=sum/C[i];./a
      |                                ^
Language: C

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
// #include<C:\Users\J\Desktop\AC\athead.h>
#define showa(v) for(int iii = 0; iii < v.size(); iii++){ cout << v[iii] << " ";} cout << endl;
#define show(iiii) cout << iiii << endl; 
#define shows(iiiii) cout << iiiii << " ";
#include<iostream>
#include<string>
#include<vector>
// #include<stdio.h>
#include <cmath>
#include <cstdlib>
#include <cassert>
#include <algorithm>
#include <set>
#include <deque>
#include <numeric>
#include<tuple>
#include <utility>
#include <map>
#include <cassert>
#include<unordered_set>
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));
    vector<int> suma(m, 0);
    rep(i,n){
        cin >> c[i];
        rep(j,m){
            cin >> a[i][j];         
            suma[j] += a[i][j];
        }
    }

    rep(j,m){
        if(suma[j] < x){
            cout << -1 << endl;
            return 0;
        }
    }
    vector<vector<int>> pool;
    vector<int> sumcs;
    vector<bool> use;
    for (int bit = 0; bit < (1<<n); ++bit) {
            // vector<int> S;
            int sumc = 0;
            vector<int> Si;
            for (int i = 0; i < n; ++i) {
                if (bit & (1<<i)) { // 列挙に i が含まれるか
                    // S.push_back(a[i][j]);
                    Si.push_back(i);
                    sumc+=c[i];
                }
            }
            pool.push_back(Si);
            sumcs.push_back(sumc);
            use.push_back(true);
        }

    rep(j,m){
        vector<int> buf(n);
        rep(i,n) buf[i] = a[i][j];
        rep(k, pool.size()){
            if(use[k]){
                int summ = 0;
                rep(kk, pool[k].size()){
                    summ += a[pool[k][kk]][j];
                }
                if(summ < x) use[k] = false;
            }          
        }
    }
    int minc = 10001;
    rep(k, use.size()){
        if(use[k]){
            if(minc > sumcs[k]){
                minc = sumcs[k];
            }
        }
    }
    cout << minc << endl;



}

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

#include<bits/stdc++.h>
using namespace std;
int main(){int n,m,x,q=-1,g=1;cin>>n>>m>>x;
vector<int>f(n,0) vector<int>c(n);vector<int>a(m*n);for(int i=0;i<n;i++)
 {cin>>c.at(i);g*=2;for(int j=0;j<m;j++)cin>>a.at(i*n+j);}
for(;g<0;g--){for(int i=0;i<m;i++)
{int v=0;for(int j=0;j<n;j++)if(f.at(j))v+=a.at(i*n+j);
 if(v<x)break;if(i==m-1){int s=0;for(int j=0;j<n;j++)if(f.at(j))s+=c.at(j);
                         if(q<0)q=s;if(q>s)q=s;}}
if(g!=1){int i=n-1;while(f.at(i))i--;f.at(i)=1;i++;for(;i<n;i++)f.at(i)=0;}
cout<<q<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:19: error: expected ',' or ';' before 'vector'
    4 | vector<int>f(n,0) vector<int>c(n);vector<int>a(m*n);for(int i=0;i<n;i++)
      |                   ^~~~~~
a.cc:5:8: error: 'c' was not declared in this scope
    5 |  {cin>>c.at(i);g*=2;for(int j=0;j<m;j++)cin>>a.at(i*n+j);}
      |        ^
a.cc:8:68: error: 'c' was not declared in this scope
    8 |  if(v<x)break;if(i==m-1){int s=0;for(int j=0;j<n;j++)if(f.at(j))s+=c.at(j);
      |                                                                    ^
a.cc:11:16: error: expected '}' at end of input
   11 | cout<<q<<endl;}
      |                ^
a.cc:3:11: note: to match this '{'
    3 | int main(){int n,m,x,q=-1,g=1;cin>>n>>m>>x;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n , m , x ,f=0;
  cin >> n >> m >> x ;
  int score[m]={0};
  int a[n][m];
  for(int i=0; i<n; i++){
    for(int j=0; j<m ; j++){
      cin >> a[i][j] ;
    }
  }
  for(i=0; i<n; i++){
    for(j=0; j<m ; j++){
      score[j] += a[i][j];
    }
  }
  for(i=0; i<m; i++){
    if(score[i] < x) f=1;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   for(i=0; i<n; i++){
      |       ^
a.cc:15:9: error: 'j' was not declared in this scope
   15 |     for(j=0; j<m ; j++){
      |         ^
a.cc:19:7: error: 'i' was not declared in this scope
   19 |   for(i=0; i<m; i++){
      |       ^
Language: C++

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

int comb(vector<vector<int>> &data, vector<int> &plus, int N, int n, int M, int X) {
  if (n == N) {
    for (int i = 0; i < M; i++) {
      bool finish = false;
      int sum = 0;
      sum = 0;
      for (int j = 0; j < N; j++) {
        int know = 0;
        for (int c : plus) {
          if (c == 1) {
            know += data.at(c).at(N + 1);
          }
        }
        if (know < X) {
          finish = true;
          break;
        }
        if (j == N - 1) {
          for (int c : plus) {
            if (c == 1) {
              sum += data.at(c).at(0);
            }
          }
          return sum;
        }
      }
      if (finish) {
        return -1;
      }
    }
  }
  if (n < N) {
    plus.at(n + 1) = 0;
    int sum_0 = comb(data, plus, N, n + 1, M, X);
    plus.at(n + 1) = 1;
    int sum_1 = comb(data, plus, N, n + 1, M, X);
    int sum = max(sum_0, sum_1);
  }
  return sum;
}

int main() {
  int N, M, X;
  cin >> 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);
    }
  }
  vector<int> plus(N, 0);
  int ans = comb(data, plus, N, 0, M, X);
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int comb(std::vector<std::vector<int> >&, std::vector<int>&, int, int, int, int)':
a.cc:42:10: error: 'sum' was not declared in this scope
   42 |   return sum;
      |          ^~~
Language: C++

#include <iostream>
using namespace std;

inline int pow_2(int n) {
	int ret = 1;

	while (n--) {
		ret *= 2;
	}
	return ret;
}

inline bool select(int value, int bit) {
	return ((0x1 & (value >> bit)) == 0x1);
}

int main() {
	int ret = INT_MAX;
	int tmp;
	int n, m, x;
	int c[16], b[16], a[16][16];
	int last;
	bool flag;

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

	last = pow_2(n);
	for (int k=0; k<last; k++) {
		for (int j=0; j<m; j++) {
			b[j] = 0;
		}
		tmp = 0;
		flag = true;
		for (int i=0; i<n; i++) {
			if (select(k, i)) {
				for (int j=0; j<m; j++) {
					b[j] += a[i][j];
				}
				tmp += c[i];
			}
		}
		for (int j=0; j<m; j++) {
			if (b[j] < x) {
				flag = false;
			}
		}
		if ((flag == true) && (tmp < ret)) {
			ret = tmp;
		}
	}

	if (ret == INT_MAX)
		ret = -1;

	cout << ret << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: 'INT_MAX' was not declared in this scope
   18 |         int ret = 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: Java

import java.util.*;
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[][] array = new intp[n][m];
    
    int check1 = 0;
    int check2 = 0;
    
    for (int i = 0; i < n; i++) {
      for (int h = 0; h < m; h++) {
        array[i][h] = sc.nextInt();
      }
    }
    
    for (int i = 0; i < m; i++) {//全部足して行かない奴がないかチェック
      int sum = 0;
      for (int h = 0; h < n; h++) {
        sum += array[h][i];
      }
      
      if (sum < x){
        System.out.println(-1);
        return;
      }
        
    }
  }
}
    
    

Compiler output:
Main.java:12: error: cannot find symbol
    int[][] array = new intp[n][m];
                        ^
  symbol:   class intp
  location: class Main
1 error
Language: C++

# include<bits/stdc++.h>
# include<unordered_map>
# include<unordered_set>
# include<prettyprint.hpp>
using namespace std;
# define ll long long
int n, m, x;
int ans = INT_MAX;
vector<int> c;
vector<vector<int> > book;
string bits(int i){
    string res;
    while (i){
        res+='0'+(i&1);
        i>>=1;
    }
    while (res.size() < n) res+='0';
    return res;
}
int calc(int i){
    string bit = bits(i);
    reverse(bit.begin(), bit.end());
    vector<int>a(m);
    int cost = 0;
    for(int i = 0; i < n; i++){
        if (bit[i] == '0') continue;
        cost += book[i][0];
        for(int j = 0; j < m; j++) a[j]+=book[i][j+1];
    }
    int flag = 0;
    for(auto i:a) if (i < x) flag = 1;
    if (!flag) return cost;
    return -1;
}
int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    cin >> n >> m >> x;
    c.resize(n);
    book.resize(n, vector<int>(m+1));
    for(int i = 0; i < n; i++){
        for(int j = 0; j <= m; j++) cin >> book[i][j];
    }
    int ans = INT_MAX;
    for(int i = 0; i < (1<<n); i++){
        int cal = calc(i);
        if (cal!=-1) ans = min(ans, calc(i));
    }
    if (ans == INT_MAX) cout << -1;
    else cout << ans;
    return 0;
}

Compiler output:
a.cc:4:10: fatal error: prettyprint.hpp: No such file or directory
    4 | # include<prettyprint.hpp>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.