Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<functional>
using namespace std;
int n,m,c,s,g,A,B,C,D,z[22][22000],r1[22][60],r2[22][60],r0[22],dp[102];
vector<pair<int,int>>X[22][102];
int dist[22][102][102],dist2[102][102];
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> Q;
void dijkstra(int s1,int s2){
	for(int i=0;i<102;i++)dist[s1][s2][i%102]=1<<30;
	dist[s1][s2][s2]=0;Q.push(make_pair(0,s2));
	while(!Q.empty()){
		int a1=Q.top().first,a2=Q.top().second;Q.pop();
		for(int i=0;i<X[s1][a2].size();i++){
			int to=X[s1][a2][i].first;
			if(dist[s1][s2][to]>a1+X[s1][a2][i].second){
				dist[s1][s2][to]=a1+X[s1][a2][i].second;
				Q.push(make_pair(dist[s1][s2][to],to));
			}
		}
	}
}
int main(){
	while(true){
		for(int i=0;i<10404;i++)dist2[i/102][i%102]=1<<30;
		cin>>n>>m>>c>>s>>g;if(n==0)break;
		for(int i=0;i<m;i++){
			cin>>A>>B>>C>>D;
			X[D][A].push_back(make_pair(B,C));
		}
		for(int i=1;i<=c;i++)cin>>r0[i];
		for(int i=1;i<=c;i++){
			for(int j=1;j<r0[i];j++)cin>>r1[i][j];
			for(int j=0;j<r0[i];j++)cin>>r2[i][j];
			int C=0;
			for(int j=0;j<22000;j++){
				z[i][j]=z[i][r1[i][C]]+(j-r1[i][C])*r2[i][C];
				if(C!=r0[i]-1 && r1[i][C+1]<=j)C++;
			}
		}
		for(int i=1;i<=c;i++){
			for(int j=1;j<=n;j++)dijkstra(i,j);
		}
		for(int i=1;i<=c;i++){
			for(int j=1;j<=n;j++){
				for(int k=1;k<=n;k++){
					if(dist[i][j][k]>=22000)continue;
					dist2[j][k]=min(dist2[j][k],z[dist[i][j][k]]);
				}
			}
		}
		for(int i=0;i<102;i++){dp[i]=1<<30;}dp[s]=0;
		for(int i=0;i<n;i++){
			for(int j=1;j<=n;j++){
				for(int k=1;k<=n;k++){
					dp[k]=min(dp[k],dp[j]+dist2[j][k]);
				}
			}
		}
		cout<<dp[g]<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:56: error: no matching function for call to 'min(int&, int [22000])'
   50 |                                         dist2[j][k]=min(dist2[j][k],z[dist[i][j][k]]);
      |                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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/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:50:56: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'int [22000]')
   50 |                                         dist2[j][k]=min(dist2[j][k],z[dist[i][j][k]]);
      |                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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,
                 from a.cc:3:
/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:50:56: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   50 |                                         dist2[j][k]=min(dist2[j][k],z[dist[i][j][k]]);
      |                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~