Language: C++

#include <iostream>
#include <map>
#include <algorithm>
#include <deque>
#include <vector>
using namespace std;

int main() {
	int N,M,K;#include <iostream>
#include <map>
#include <algorithm>
#include <deque>
#include <vector>
using namespace std;

int main() {
	int N,M,K;
	vector<pair<int,int> >nGo[3001];
	deque<int> dis;
	int dist[3001];
	int road[3000][3];
	for(int i=1;i<=3000;i++)
		dist[i]=(1 << 30 );
	cin >> N >> M >> K;
	int a,b,c;
	for(int i=0;i<M;i++){
		cin >> a >> b >> c;
		nGo[a].push_back(pair<int,int>(b,c));
		nGo[b].push_back(pair<int,int>(a,c));
		road[i][0]=a;
		road[i][1]=b;
		road[i][2]=c;
	}
	for(int i=0;i<K;i++){
		cin >> a;
	//	dis.insert(multimap<int,int>::value_type(0,a));
		dis.push_back(a);
		dist[a]=0;
	}
	while(!dis.empty()){
		sort(dis.begin(),dis.end());
		int now=dis[0];
		for(int i=0;i<nGo[now].size();i++){
			if(dist[nGo[now][i].first]>dist[now]+nGo[now][i].second){
				dis.push_back(nGo[now][i].first);
				dist[nGo[now][i].first]=dist[now]+nGo[now][i].second;
			}
		}
		dis.pop_front();
	}
	int maxer=0;
	for(int i=0;i<M;i++)
	maxer=max(maxer,(int)(dist[road[i][0]]+dist[road[i][1]]+road[i][2]+1)/2);
	for(int i=1;i<=N;i++)
	maxer=max(maxer,dist[i]);
	cout << maxer <<  endl;
	return 0;
}
	vector<pair<int,int> >nGo[3001];
	deque<int> dis;
	int dist[3001];
	int road[3000][3];
	for(int i=1;i<=3000;i++)
		dist[i]=(1 << 30 );
	cin >> N >> M >> K;
	int a,b,c;
	for(int i=0;i<M;i++){
		cin >> a >> b >> c;
		nGo[a].push_back(pair<int,int>(b,c));
		nGo[b].push_back(pair<int,int>(a,c));
		road[i][0]=a;
		road[i][1]=b;
		road[i][2]=c;
	}
	for(int i=0;i<K;i++){
		cin >> a;
	//	dis.insert(multimap<int,int>::value_type(0,a));
		dis.push_back(a);
		dist[a]=0;
	}
	while(!dis.empty()){
		sort(dis.begin(),dis.end());
		int now=dis[0];
		for(int i=0;i<nGo[now].size();i++){
			if(dist[nGo[now][i].first]>dist[now]+nGo[now][i].second){
				dis.push_back(nGo[now][i].first);
				dist[nGo[now][i].first]=dist[now]+nGo[now][i].second;
			}
		}
		dis.pop_front();
	}
	int maxer=0;
	for(int i=0;i<M;i++)
	maxer=max(maxer,(int)(dist[road[i][0]]+dist[road[i][1]]+road[i][2]+0.5)/2);
	for(int i=1;i<=N;i++)
	maxer=max(maxer,dist[i]);
	cout << maxer <<  endl;
	return 0;
}

Compiler output:
a.cc:9:19: error: stray '#' in program
    9 |         int N,M,K;#include <iostream>
      |                   ^
a.cc: In function 'int main()':
a.cc:9:20: error: 'include' was not declared in this scope
    9 |         int N,M,K;#include <iostream>
      |                    ^~~~~~~
a.cc:9:37: error: expected primary-expression before '>' token
    9 |         int N,M,K;#include <iostream>
      |                                     ^
a.cc:14:1: error: expected primary-expression before 'using'
   14 | using namespace std;
      | ^~~~~
a.cc:16:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   16 | int main() {
      |         ^~
a.cc:16:9: note: remove parentheses to default-initialize a variable
   16 | int main() {
      |         ^~
      |         --
a.cc:16:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:16:12: error: a function-definition is not allowed here before '{' token
   16 | int main() {
      |            ^