Language: C++

int main(){
    int n,m,x;
    cin>>n>>m>>x;
    vector<int> c(n);
    vector<vector <int> > a(n,vector<int>(m));
    vector<int> und(m,0);
    int ans=0;
    for(int i=0;i<n;i++){
        cin>>c[i];
        ans+=c[i];
        for(int j=0;j<m;j++){
            cin>>a[i][j];
            und[j]+=a[i][j];
        }
    }
    int count=0;
    for(int i=0;i<m;i++){
        if(und[i]>=x) count++;
    }
    if(count!=m){
        cout<<"-1"<<endl;
        return 0;
    }
    for(int i=0;i<(1<<n);i++){
        vector<int> tmp(m,0);
        int money=0;
        for(int j=0;j<n;j++){
            if(i>>j & 1){
                money+=c[j];
                for(int k=0;k<m;k++){
                    tmp[k]+=a[j][k];
                }
            }
        }
        int count=0;
        for(int j=0;j<m;j++){
            if(tmp[j]>=x) count++;
        }
        if(count==m){
            ans=min(ans,money);
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin>>n>>m>>x;
      |     ^~~
a.cc:4:5: error: 'vector' was not declared in this scope
    4 |     vector<int> c(n);
      |     ^~~~~~
a.cc:4:12: error: expected primary-expression before 'int'
    4 |     vector<int> c(n);
      |            ^~~
a.cc:5:20: error: expected primary-expression before 'int'
    5 |     vector<vector <int> > a(n,vector<int>(m));
      |                    ^~~
a.cc:6:12: error: expected primary-expression before 'int'
    6 |     vector<int> und(m,0);
      |            ^~~
a.cc:9:14: error: 'c' was not declared in this scope
    9 |         cin>>c[i];
      |              ^
a.cc:12:18: error: 'a' was not declared in this scope
   12 |             cin>>a[i][j];
      |                  ^
a.cc:13:13: error: 'und' was not declared in this scope
   13 |             und[j]+=a[i][j];
      |             ^~~
a.cc:18:12: error: 'und' was not declared in this scope
   18 |         if(und[i]>=x) count++;
      |            ^~~
a.cc:21:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   21 |         cout<<"-1"<<endl;
      |         ^~~~
      |         count
a.cc:21:21: error: 'endl' was not declared in this scope
   21 |         cout<<"-1"<<endl;
      |                     ^~~~
a.cc:25:16: error: expected primary-expression before 'int'
   25 |         vector<int> tmp(m,0);
      |                ^~~
a.cc:29:24: error: 'c' was not declared in this scope
   29 |                 money+=c[j];
      |                        ^
a.cc:31:21: error: 'tmp' was not declared in this scope
   31 |                     tmp[k]+=a[j][k];
      |                     ^~~
a.cc:31:29: error: 'a' was not declared in this scope
   31 |                     tmp[k]+=a[j][k];
      |                             ^
a.cc:37:16: error: 'tmp' was not declared in this scope
   37 |             if(tmp[j]>=x) count++;
      |                ^~~
a.cc:40:17: error: 'min' was not declared in this scope; did you mean 'main'?
   40 |             ans=min(ans,money);
      |                 ^~~
      |                 main
a.cc:43:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   43 |     cout<<ans<<endl;
      |     ^~~~
      |     count
a.cc:43:16: error: 'endl' was not declared in this scope
   43 |     cout<<ans<<endl;
      |                ^~~~