Language: C++

#include <iostream>      // cout, endl, cin
#include <string>        // string, to_string, stoi
#include <vector>        // vector
#include <algorithm>     // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility>       // pair, make_pair
#include <tuple>         // tuple, make_tuple
#include <cstdint>       // int64_t, int*_t
#include <cstdio>        // printf
#include <map>           // map
#include <cmath>         // sqrt
#include <queue>         // queue, priority_queue
#include <set>           // set
#include <stack>         // stack
#include <deque>         // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset>        // bitset
#include <bits/stdc++.h> // isupper, islower, isdigit, toupper, tolower
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, n) for (int i = (a); i < (n); i++)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> Pl;
typedef pair<int, int> P;
typedef tuple<ll, ll, string> Tlls;

ll N, M, X;
ll INF = 1000000000;
ll ANS = INF;
vector<vector<ll>> data(15, vector<ll>(15));
vector<ll> ans(15);

// vector<vector<ll>> data(5, vector<ll>(5));
// vector<ll> ans(5);
ll dfs(ll p, vector<ll> ans)
{
  vector<ll> tmp(15);
  // vector<ll> tmp(5);
  if (p > N)
  {
    rep2(i, 1, M + 1)
    {
      if (ans.at(i) < X)
      {
        // cout << ans.at(0) << endl;
        return INF;
      }
    }
    ANS = min(ANS, ans.at(0));
    // cout << ANS << endl;
    return ANS;
  }
  rep(i, M + 2)
  {
    tmp.at(i) = data[p][i] + ans.at(i);
  }
  dfs(p + 1, tmp);
  dfs(p + 1, ans);
  return ANS;
}

int main()
{

  cin >> N >> M >> X;
  rep(i, N)
  {
    rep(j, M + 1)
    {
      cin >> data[i][j];
    }
  }
  ll ans2 = dfs(0, ans);
  if (ans2 == INF)
  {
    cout << "-1" << endl;
  }
  else
  {
    cout << ans2 << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'll dfs(ll, std::vector<long long int>)':
a.cc:56:17: error: reference to 'data' is ambiguous
   56 |     tmp.at(i) = data[p][i] + ans.at(i);
      |                 ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:31:20: note:                 'std::vector<std::vector<long long int> > data'
   31 | vector<vector<ll>> data(15, vector<ll>(15));
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:71:14: error: reference to 'data' is ambiguous
   71 |       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:31:20: note:                 'std::vector<std::vector<long long int> > data'
   31 | vector<vector<ll>> data(15, vector<ll>(15));
      |                    ^~~~