제출 #866450

#제출 시각아이디문제언어결과실행 시간메모리
866450salmonOlympic Bus (JOI20_ho_t4)C++14
컴파일 에러
0 ms0 KiB
if(ton[t]){
            for(int i = 1; i <= N; i++) tempd[i] = inf;

            tempd[1] = 0;
            for(int j : adjlst[i]){
                pq.push(make_pair(edge[j][2], j));
            }

            while(!pq.empty()){
                pair<int,int> ii = pq.top();
                pq.pop();

                int i = edge[ii.second][1];

                if(tempd[i] != inf) continue;

                tempd[i] = ii.first;
                for(int j : adjlst[i]){
                    pq.push(make_pair(tempd[i] + edge[j][2],j));
                }
            }

            temp = tempd[N];
        }
        else temp = min((long long int)f1d[N], f1d[edge[i][1]] + (long long int)bnd[edge[i][0]] + edge[i][2]);

컴파일 시 표준 에러 (stderr) 메시지

ho_t4.cpp:1:1: error: expected unqualified-id before 'if'
    1 | if(ton[t]){
      | ^~
ho_t4.cpp:25:9: error: expected unqualified-id before 'else'
   25 |         else temp = min((long long int)f1d[N], f1d[edge[i][1]] + (long long int)bnd[edge[i][0]] + edge[i][2]);
      |         ^~~~