Language: C++

#include <bits/stdc++.h>
#include <string>
 
using namespace std;
using namespace std::chrono; 
 
 
 
//c++ templte for help...........................................................
 
//#define deb(x) cout<<#x<<" "<<x<<endl;/* for debuging  printing variable with name*/
//#define debb(x,y) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<endl;										
//#define debbb(x,y,z) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<" "<<#z<<" "<<z<<endl;			
 
//typedef long long ll;
//typedef unsigned long long ull;
	
 
//for loop
//#define fo(i,n) for(int i=0;i<(ll)n;i++)
//#define Fo(i,k,n) for(int i=k;i<n;i++)
 
 
//to print vector element 
//template<typename T>
//void printV(T vec){
	//fo(i,vec.size()) cout<<vec[i]<<" "<<flush;
	//cout<<endl;
	//}
	
 
//#define modulo 1000000007
//const int INF=1e9+5;
 
//iterate map
//template<typename T>
//void itR(T map){
	 //for(auto itr=map.begin();itr!=map.end();itr++){
				//debb(itr->first,itr->second)
			//}
	//cout<<endl;
//}
 
 
 
//c++ template for help........................................................



int main() {
	//stringstream ss;
	//ss<<"akhil";
	//cout<<ss.str()<<endl;
	cout<<setprecision(50);
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	
	 // TESTCASE KO DEKH KA BHAUT SARA CONDITION GENERATE MAT KRO 
	 // PAPER PD CONFIRM HO JAO THORA JADA TIME HI KYU NA LGA
	 // greedy ma jadatr exceptional case check kr ke dekh lo
	 
	 // WHILE DOING THE QUESTION OF DYNAMIC PROGRAMMING GREEDY KA TRAH SOCHNA BAND KRO
	 // DP M DATA KA BHI USE KRNA PDTA HA BE BHULO MT 
	 // DP BHI WO LEETCODE WALE MATRIX KA QUESTION KI TARAH HA
	 // CONSTRAIN WILL BE THE DIMENSION OF DP
	 // DP MA STATE PTA KRO AUR PHIR FUNCTION GENERATE KRO
	 // OBJECT KO CHOOSE KIA YA NAE KIA AGAR KIA TO KYA HOGA AUR NAE KIA TO KYA HOGA
	 // KYA KYA CHEJ IMPORTANT HA WO STATE BN JYAGA AUR HUM LOG STATE KO CHANGE KR SKTA HA JYSA KNPSACK 2 WALE PROBLEM MA KIA THA
	 

	 
	//ll testCase;
	//cin>>testCase;
	//for(ll tt=0;tt<testCase;tt++){
		ll n,m,x;
		ll mincost=1e9+5;
		cin>>n>>m>>x;
		
		vector<vector<ll>> vec(n,vector<ll>(m+1,0));
		for(ll i=0;i<n;i++){
			for(ll j=0;j<m+1;j++){
				cin>>vec[i][j];
			}
		}
		
		for(ll mask=0;mask<(1<<n);mask++){
			ll cost=0;
			vector<ll> v(m,0);
			for(ll i=0;i<n;i++){
				if(mask&(1<<i)){
					cost+=vec[i][0];
					for(ll j=0;j<m;j++){
						v[j]+=vec[i][j+1];
					}
				}
			}
			ll k=0;
			printV(v);
			while(v[k]>=x and k<v.size()){
				k++;
			}
			if(k==v.size()) mincost=min(mincost,cost);
		}
		
		if(mincost!=INT_MAX)
			cout<<mincost<<endl;
		else cout<<-1<<endl;

	//}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:76:17: error: 'll' was not declared in this scope
   76 |                 ll n,m,x;
      |                 ^~
a.cc:77:19: error: expected ';' before 'mincost'
   77 |                 ll mincost=1e9+5;
      |                   ^~~~~~~~
      |                   ;
a.cc:78:22: error: 'n' was not declared in this scope; did you mean 'yn'?
   78 |                 cin>>n>>m>>x;
      |                      ^
      |                      yn
a.cc:78:25: error: 'm' was not declared in this scope; did you mean 'tm'?
   78 |                 cin>>n>>m>>x;
      |                         ^
      |                         tm
a.cc:78:28: error: 'x' was not declared in this scope
   78 |                 cin>>n>>m>>x;
      |                            ^
a.cc:80:31: error: template argument 2 is invalid
   80 |                 vector<vector<ll>> vec(n,vector<ll>(m+1,0));
      |                               ^~
a.cc:80:33: error: template argument 1 is invalid
   80 |                 vector<vector<ll>> vec(n,vector<ll>(m+1,0));
      |                                 ^~
a.cc:80:33: error: template argument 2 is invalid
a.cc:80:51: error: template argument 2 is invalid
   80 |                 vector<vector<ll>> vec(n,vector<ll>(m+1,0));
      |                                                   ^
a.cc:80:59: error: expression list treated as compound expression in initializer [-fpermissive]
   80 |                 vector<vector<ll>> vec(n,vector<ll>(m+1,0));
      |                                                           ^
a.cc:81:23: error: expected ';' before 'i'
   81 |                 for(ll i=0;i<n;i++){
      |                       ^~
      |                       ;
a.cc:81:28: error: 'i' was not declared in this scope
   81 |                 for(ll i=0;i<n;i++){
      |                            ^
a.cc:82:31: error: expected ';' before 'j'
   82 |                         for(ll j=0;j<m+1;j++){
      |                               ^~
      |                               ;
a.cc:82:36: error: 'j' was not declared in this scope; did you mean 'jn'?
   82 |                         for(ll j=0;j<m+1;j++){
      |                                    ^
      |                                    jn
a.cc:87:23: error: expected ';' before 'mask'
   87 |                 for(ll mask=0;mask<(1<<n);mask++){
      |                       ^~~~~
      |                       ;
a.cc:87:31: error: 'mask' was not declared in this scope; did you mean 'std::filesystem::perms::mask'?
   87 |                 for(ll mask=0;mask<(1<<n);mask++){
      |                               ^~~~
      |                               std::filesystem::perms::mask
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:162:7: note: 'std::filesystem::perms::mask' declared here
  162 |       mask              = 07777,
      |       ^~~~
a.cc:88:27: error: expected ';' before 'cost'
   88 |                         ll cost=0;
      |                           ^~~~~
      |                           ;
a.cc:89:34: error: template argument 2 is invalid
   89 |                         vector<ll> v(m,0);
      |                                  ^
a.cc:89:41: error: expression list treated as compound expression in initializer [-fpermissive]
   89 |                         vector<ll> v(m,0);
      |                                         ^
a.cc:90:31: error: expected ';' before 'i'
   90 |                         for(ll i=0;i<n;i++){
      |                               ^~
      |                               ;
a.cc:90:36: error: 'i' was not declared in this scope
   90 |                         for(ll i=0;i<n;i++){
      |                                    ^
a.cc:92:41: error: 'cost' was not declared in this scope; did you mean 'cosl'?
   92 |                                         cost+=vec[i][0];
      |                                         ^~~~
      |                                         cosl
a.cc:93:47: error: expected ';' before 'j'
   93 |                                         for(ll j=0;j<m;j++){
      |                                               ^~
      |                                               ;
a.cc:93:52: error: 'j' was not declared in this scope
   93 |                                         for(ll j=0;j<m;j++){
      |                                                    ^
a.cc:98:27: error: expected ';' before 'k'
   98 |                         ll k=0;
      |                           ^~
      |                           ;
a.cc:99:25: error: 'printV' was not declared in this scope; did you mean 'printf'?
   99 |                         printV(v);
      |                         ^~~~~~
      |                         printf
a.cc:100:33: error: 'k' was not declared in this scope
  100 |                         while(v[k]>=x and k<v.size()){
      |                                 ^
a.cc:100:47: error: request for member 'size' in 'v', which is of non-class type 'int'
  100 |                         while(v[k]>=x and k<v.size()){
      |                                               ^~~~
a.cc:103:28: error: 'k' was not declared in this scope
  103 |                         if(k==v.size()) mincost=min(mincost,cost);
      |                            ^
a.cc:103:33: error: request for member 'size' in 'v', which is of non-class type 'int'
  103 |                         if(k==v.size()) mincost=min(mincost,cost);
      |                                 ^~~~
a.cc:103:41: error: 'mincost' was not declared in this scope; did you mean 'sincosl'?
  103 |                         if(k==v.size()) mincost=min(mincost,cost);
      |                                         ^~~~~~~
      |                                         sincosl
a.cc:103:61: error: 'cost' was not declared in this scope; did you mean 'cosl'?
  103 |                         if(k==v.size()) mincost=min(mincost,cost);
      |                                                             ^~~~
      |                                                             cosl
a.cc:106:20: error: 'mincost' was not declared in this scope; did you mean 'sincosl'?
  106 |                 if(mincost!=INT_MAX)
      |                    ^~~~~~~
      |                    sincosl