Language: C++

#include <bits/stdc++.h>
int n,m,x,A[20][20];
int main(){
    cin>>n>>m>>x;
    for(int i=0;i<n;++i){
        for(int j=0;j<m+1;++j){
            cin>>A[i][j];
        }
    }
    ll ans=10000000000;
    for(int msk=0;msk<(1<<n);++msk){
        int skill[20]={0};
        ll cur=0;
        for(int i=0;i<n;++i){
            if(msk&(1<<i)){
                cur+=A[i][0];
                for(int j=1;j<m+1;++j){
                    skill[j-1]+=A[i][j];
                }
            }
        }
        int cnt=0;
        for(int i=0;i<m;++i){
            if(skill[i]>=x){
                ++cnt;
            }
        }
        if(cnt==m){
            ans=min(ans,cur);
        }
    }
    if(ans==10000000000) cout<<-1<<"\n";
    else cout<<ans<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |     cin>>n>>m>>x;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:5: error: 'll' was not declared in this scope
   10 |     ll ans=10000000000;
      |     ^~
a.cc:13:11: error: expected ';' before 'cur'
   13 |         ll cur=0;
      |           ^~~~
      |           ;
a.cc:16:17: error: 'cur' was not declared in this scope
   16 |                 cur+=A[i][0];
      |                 ^~~
a.cc:29:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |             ans=min(ans,cur);
      |             ^~~
      |             abs
a.cc:29:25: error: 'cur' was not declared in this scope
   29 |             ans=min(ans,cur);
      |                         ^~~
a.cc:29:17: error: 'min' was not declared in this scope; did you mean 'std::min'?
   29 |             ans=min(ans,cur);
      |                 ^~~
      |                 std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:32:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   32 |     if(ans==10000000000) cout<<-1<<"\n";
      |        ^~~
      |        abs
a.cc:32:26: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   32 |     if(ans==10000000000) cout<<-1<<"\n";
      |                          ^~~~
      |                          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:33:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   33 |     else cout<<ans<<"\n";
      |          ^~~~
      |          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~