Language: C++

#include<bits/stdc++.h>

#define INF 1e9
#define llINF 1e18
#define MOD 1e9+7
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
using namespace std;
typedef struct E{
  int to,cost,cost2;
}edge;
vector<vector<edge> >E(110);
int memo[110][110];
bool used[110]={};
int n,m,l;
int ans=INF;
void dfs(int now,int nokori,int sum){
  if(now==n){
    ans=min(ans,sum);
    return;
  }
  if(memo[nokori][now]<=sum)return;
  for(int i=0;i<nokori;i++)
    memo[i][now]=min(sum,memo[now]);

  for(int i=0;i<E[now].size();i++){
    if(used[E[now][i].to]==false){
      used[E[now][i].to]=true;
      if(nokori-E[now][i].cost>=0){
	dfs(E[now][i].to,nokori-E[now][i].cost,sum);
      }
      dfs(E[now][i].to,nokori,sum+E[now][i].cost2);
      used[E[now][i].to]=false;
    }
  }
}
int main(){
  while(cin>>n>>m>>l,n){
    n--;
    ans=INF;
    for(int i=0;i<n+5;i++){
      for(int j=0;j<l+5;j++)
      memo[j][i]=INF;
      E[i].clear();
      used[i]=false;
    }
    for(int i=0;i<m;i++){
      int a,b,d,e;cin>>a>>b>>d>>e;
      a--;b--;
      edge ee;ee.to=b;ee.cost=d;ee.cost2=e;
      E[a].pb(ee);
      ee.to=a;
      E[b].pb(ee);
    }
    dfs(0,l,0);
    cout<<ans<<endl;
  }

  return 0;
}



Compiler output:
a.cc: In function 'void dfs(int, int, int)':
a.cc:27:21: error: no matching function for call to 'min(int&, int [110])'
   27 |     memo[i][now]=min(sum,memo[now]);
      |                  ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:27:21: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'int [110]')
   27 |     memo[i][now]=min(sum,memo[now]);
      |                  ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:27:21: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   27 |     memo[i][now]=min(sum,memo[now]);
      |                  ~~~^~~~~~~~~~~~~~~