Language: C++

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define s size()
#define INF 100000000
int cost[3005][3005];
int d[3005];
int maxi[100005]={};
bool used[3005]={};
pair<pair<int,int> > ii[100005];
int V;
void dijkstra(int s){
	fill(d,d+V,INF);
	d[s]=0;
	while(1){
		int v=-1;
		for(int u=0;u<V;u++){
			if(!used[u] && (v==-1 || d[u]<d[v]){
				v=u;
			}
		}
		if(v==-1){
			break;
		}
		used[v]=true;
		for(int i=0;i<V;i++){
			d[i]=min(d[i],d[v]+cost[v][i]);
		}
	}
}
int n,m,k;
int main(){
	scanf("%d %d %d",&n,&m,&k);
	for(int i=0;i<3005;i++){
		for(int j=0;j<3005;j++){
			cost[i][j]=INF;
		}
	}
	for(int i=0;i<m;i++){
		int w,ww,eu;
		scanf("%d %d %d",&w,&ww,&eu);
		ii[i]=mp(eu,mp(w,ww));
		cost[w-1][ww-1]=eu;
		cost[ww-1][w-1]=eu;
	}
	int res=0;
	for(int i=0;i<k;i++){
		int t;
		scanf("%d",&t);
		dijkstra(t-1);
		memset(used,0,sizeof(used));
		for(int j=0;j<m;j++){
			maxi[j]=max(maxi[j],(ii[j].first+d[ii[j].second.first-1]+d[ii[j].second.second-1]+1)/2);
		}
	}
	for(int j=0;j<m;j++){
		res=max(res,maxi[j]);
	}
	printf("%d\n",res);
	return 0;
}

Compiler output:
a.cc:24:20: error: wrong number of template arguments (1, should be 2)
   24 | pair<pair<int,int> > ii[100005];
      |                    ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc: In function 'void dijkstra(int (*)())':
a.cc:32:60: error: expected ')' before '{' token
   32 |                         if(!used[u] && (v==-1 || d[u]<d[v]){
      |                           ~                                ^
      |                                                            )
a.cc:35:17: error: expected primary-expression before '}' token
   35 |                 }
      |                 ^
a.cc: In function 'int main()':
a.cc:56:29: error: 'mp' was not declared in this scope; did you mean 'm'?
   56 |                 ii[i]=mp(eu,mp(w,ww));
      |                             ^~
      |                             m
a.cc:56:23: error: 'mp' was not declared in this scope; did you mean 'm'?
   56 |                 ii[i]=mp(eu,mp(w,ww));
      |                       ^~
      |                       m
a.cc:64:27: error: invalid conversion from 'int' to 'int (*)()' [-fpermissive]
   64 |                 dijkstra(t-1);
      |                          ~^~
      |                           |
      |                           int
a.cc:18:11: note:   initializing argument 1 of 'void dijkstra(int (*)())'
   18 | #define s size()
      |           ^
a.cc:26:19: note: in expansion of macro 's'
   26 | void dijkstra(int s){
      |                   ^
a.cc:67:52: error: request for member 'first' in 'ii[j]', which is of non-class type 'int'
   67 |                         maxi[j]=max(maxi[j],(ii[j].first+d[ii[j].second.first-1]+d[ii[j].second.second-1]+1)/2);
      |                                                    ^~~~~
a.cc:67:66: error: request for member 'second' in 'ii[j]', which is of non-class type 'int'
   67 |                         maxi[j]=max(maxi[j],(ii[j].first+d[ii[j].second.first-1]+d[ii[j].second.second-1]+1)/2);
      |                                                                  ^~~~~~
a.cc:67:90: error: request for member 'second' in 'ii[j]', which is of non-class type 'int'
   67 |                         maxi[j]=max(maxi[j],(ii[j].first+d[ii[j].second.first-1]+d[ii[j].second.second-1]+1)/2);
      |                                                                                          ^~~~~~