Language: C++

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

#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL);
#define ll long long
#define vi vector< int > 
#define pii pair< int, int >
#define mii map< int , int > 
#define F(start,stop) for(int i=start; i<stop; i++)
#define FRev(start,stop) for(int i=start; i>=stop; i--)
#define debugVector(v) for(int i = 0; i < v.size(); i++) cout << v[i] << " "; cout << endl;
#define debugArray(arr, n) for(int i=0; i<n; i++) cout << arr[i] << " "; cout << endl;
#define MOD1 1000000007
#define MOD2 998244353


ll n,m,x;
ll min_cost = LLONG_MAX;
ll data[50][50];
	
void findMin(ll cur, ll cur_know[]){

	// Check if already done!
	bool isTrue = true;
	for(int i=1; i <= m ; i++){
		if(cur_know[i] < x){
			isTrue = false;
			break;
		}
	}
	if(isTrue) min_cost = min (min_cost, cur_know[0]);
	
	if(cur == n)
		return;

	// Call without change
	findMin(cur+1, cur_know);

	// Call with change
	for(int i=0; i<=m; i++)
		cur_know[i] += data[cur][i];
	
	findMin(cur+1, cur_know);
	
	for(int i=0; i<=m; i++)
		cur_know[i] -= data[cur][i];
}

int main()
{

	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif

	IOS

	cin >> n >> m >> x;
	for(int i=0; i<n; i++){
		for(int j=0; j<=m; j++){
			cin >> data[i][j]; 
		}
	}
	ll cur_know[m+1] ={0};

	findMin(0, cur_know);
	if(min_cost == LLONG_MAX){
		cout << -1 << endl;
		return 0;
	}
	cout << min_cost << endl;
}

Compiler output:
a.cc: In function 'void findMin(long long int, long long int*)':
a.cc:41:32: error: reference to 'data' is ambiguous
   41 |                 cur_know[i] += data[cur][i];
      |                                ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:19:4: note:                 'long long int data [50][50]'
   19 | ll data[50][50];
      |    ^~~~
a.cc:46:32: error: reference to 'data' is ambiguous
   46 |                 cur_know[i] -= data[cur][i];
      |                                ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:19:4: note:                 'long long int data [50][50]'
   19 | ll data[50][50];
      |    ^~~~
a.cc: In function 'int main()':
a.cc:62:32: error: reference to 'data' is ambiguous
   62 |                         cin >> data[i][j];
      |                                ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:19:4: note:                 'long long int data [50][50]'
   19 | ll data[50][50];
      |    ^~~~