Language: C++

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


long long N,M,X;
long long ans = 9999999999;
bool cant=true;
vector<vector<long long>> data(12, vector<long long>(12+1));
int rec(long long i, vector<long long> wa, long long nedan) {
    if (i==N) {
        bool isOK=true;
        for (int i=0; i<M; i++) {
            if (wa.at(i)<X) isOK=false;
        }

        if (isOK) {
            cant = false;
            ans = min(ans,nedan);
        }
        return 0;
    }
    rec(i+1, wa, nedan);
    for (int j=0; j<M; j++) wa.at(j)+=data.at(i).at(j+1);
    nedan+=data.at(i).at(0);
    rec(i+1, wa, nedan);
    return 0;
}

int main() {
    cin >> N >> M >> X;
    //long long wa[M];
    vector <long long> wa(M);
    for (int i=0; i<M; i++) wa[i]=0;
    for (int i=0; i<N; i++) {
        for (int j=0; j<M+1; j++) {
            cin >> data.at(i).at(j);
        }
    }
    long long nedan=0;
    rec(0, wa, nedan);
    if (cant) cout << "-1";
    else cout << ans;
}

Compiler output:
a.cc: In function 'int rec(long long int, std::vector<long long int>, long long int)':
a.cc:23:39: error: reference to 'data' is ambiguous
   23 |     for (int j=0; j<M; j++) wa.at(j)+=data.at(i).at(j+1);
      |                                       ^~~~
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:8:27: note:                 'std::vector<std::vector<long long int> > data'
    8 | vector<vector<long long>> data(12, vector<long long>(12+1));
      |                           ^~~~
a.cc:24:12: error: reference to 'data' is ambiguous
   24 |     nedan+=data.at(i).at(0);
      |            ^~~~
/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:8:27: note:                 'std::vector<std::vector<long long int> > data'
    8 | vector<vector<long long>> data(12, vector<long long>(12+1));
      |                           ^~~~
a.cc: In function 'int main()':
a.cc:36:20: error: reference to 'data' is ambiguous
   36 |             cin >> data.at(i).at(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:8:27: note:                 'std::vector<std::vector<long long int> > data'
    8 | vector<vector<long long>> data(12, vector<long long>(12+1));
      |                           ^~~~