Language: C++

#include <fstream>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <bitset>
#include <string>
#include <numeric>
#include <algorithm>
#include <functional>
#include <iterator>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <complex>
#include <ctime>
#include <utility>

using namespace std;

#define PI acos(-1.0)
#define EPS 1e-6
#define LGE 0.434294481903//log10(e)
#define lll __int64
#define ll long long
#define INF 0x7fffffff
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define dep(i,a,b) for(int i=a;i>=b;i--)

typedef pair<int,int> pii;
const int N=6002;
const int N2=6002;
int node_num,edge_num,start_node,final_node;
int gap_num,cap;
int node_first[N],node_next[N2],node_begin[N2],node_end[N2],node_value[N2];
int distance_[N];
double gap[N];
priority_queue<pii,vector<pii>,greater<pii> > pq;
struct jcc
{
    char cc[20];
    bool operator < (const jcc& a) const
    {
        return strcmp(cc,a.cc)==1;//莉主、ァ蛻ー蟆?    }
};
jcc ctms;

map<jcc,int> ma;
map<jcc,int>::iterator it;
bool ggap[N];

void dijkstra()
{
    rep(i,1,node_num)   distance_[i]=INF;
    distance_[start_node]=0;
    rep(i,1,node_num)
    gap[i]=0;
    gap[start_node]=cap;
    pq.push(make_pair(distance_[start_node],start_node));
    while(!pq.empty())
    {
        pii pi=pq.top();
        int x=pi.second;
        pq.pop();
        if(pi.first!=distance_[x]) continue;
        for(int i=node_first[x]; i!=-1; i=node_next[i])
        {
            if(gap[x]*10>=node_value[i]&&distance_[node_end[i]]>distance_[x]+node_value[i])
            {
                distance_[node_end[i]]=distance_[x]+node_value[i];
                pq.push(make_pair(distance_[node_end[i]],node_end[i]));
                if(ggap[node_end[i]]==0) gap[node_end[i]]=(double)max(gap[node_end[i]],gap[x]*10-node_value[i])/10;
                else    gap[node_end[i]]=cap;
            }
        }
    }
}

int main()
{
    //freopen("D:\\input.in","r",stdin);
    //freopen("D:\\output.out","w",stdout);
    while(scanf("%d%d%d",&edge_num,&gap_num,&cap)&&(edge_num||gap_num||cap))
    {
        ma.clear();
        start_node=1;
        final_node=2;

        int tj0=1;
        scanf("%s",ctms.cc);
        ma.insert(pair<jcc,int>(ctms,tj0++));
        scanf("%s",ctms.cc);
        ma.insert(pair<jcc,int>(ctms,tj0++));
        node_num=edge_num*2;
        rep(i,1,node_num)
        {
            node_first[i]=-1;
        }
        int t1,t2,t3;
        rep(i,1,edge_num)
        {
            scanf("%s",ctms.cc);
            it=ma.find(ctms);
            if(it!=ma.end())
            {
                t1=(*it).second;
            }
            else
            {
                t1=tj0;
                ma.insert(pair<jcc,int>(ctms,tj0++));
            }
            scanf("%s",ctms.cc);
            it=ma.find(ctms);
            if(it!=ma.end())
            {
                t2=(*it).second;
            }
            else
            {
                t2=tj0;
                ma.insert(pair<jcc,int>(ctms,tj0++));
            }
            scanf("%d",&t3);
            node_begin[i]=t1;
            node_end[i]=t2;
            node_value[i]=t3;
            node_next[i]=node_first[node_begin[i]];
            node_first[node_begin[i]]=i;
            node_begin[i+edge_num]=node_end[i];
            node_end[i+edge_num]=node_begin[i];
            node_value[i+edge_num]=node_value[i];
            node_next[i+edge_num]=node_first[node_begin[i+edge_num]];
            node_first[node_begin[i+edge_num]]=i+edge_num;
        }
        node_num=tj0-1;
        rep(i,1,node_num)
        ggap[i]=0;
        rep(i,1,gap_num)
        {
            scanf("%s",ctms.cc);
            it=ma.find(ctms);
            ggap[(*it).second]=1;
        }
        dijkstra();
        if(distance_[final_node]==INF)  puts("-1");
        else printf("%d\n",distance_[final_node]);
    }
    return 0;
}

Compiler output:
a.cc:54:5: error: field 'ctms' has incomplete type 'jcc'
   54 | jcc ctms;
      |     ^~~~
a.cc:47:8: note: definition of 'struct jcc' is not complete until the closing brace
   47 | struct jcc
      |        ^~~
a.cc:158:2: error: expected '}' at end of input
  158 | }
      |  ^
a.cc:48:1: note: to match this '{'
   48 | {
      | ^
a.cc:158:2: error: expected unqualified-id at end of input
  158 | }
      |  ^