답안 #979960

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
979960 2024-05-11T17:40:55 Z vjudge1 봉쇄 시간 (IOI23_closing) C++17
컴파일 오류
0 ms 0 KB
#include "longesttrip.h"
using namespace std;
#define pb push_back
vector<int> longest_trip(int N, int D)
{
    vector<int> ans;
    vector<int> v1 (1);
    vector<int> v2(1);
    if(N==3){
        v1={0};
        v2={1};
        if(are_connected(v1,v2)){
            v1={1};
            v2={2};
            if(are_connected(v1,v2)){
                ans={0,1,2};
                return ans;
            }
            else{
                ans={1,0,2};
                return ans;
            }
        }
        else{
            ans={0,2,1};
            return ans;
        }
    }
    ans.pb(0);
    int last=0;
    for(int i=1; i<N-1; ++i){
        v1={last};
        v2={i};
        if(are_connected(v1,v2)){
            ans.pb(i);
            last=i;
        }
        else{
            i++;
            ans.pb(i);
            ans.pb(i-1);
            last=i-1;
        }
    }
    if(ans.size()!=N){
        v1={last};
        v2={N-1};
        if(are_connected(v1,v2)){
            ans.pb(N-1);
            last=N-1;
        }
        else{
        int a=ans[ans.size()-1];
        ans.pop_back();
        int b=ans[ans.size()-1];
        ans.pop_back();
        ans.pb(N-1);
        ans.pb(b);
        ans.pb(a);
        }
    }
    return ans;

}

Compilation message

closing.cpp:1:10: fatal error: longesttrip.h: No such file or directory
    1 | #include "longesttrip.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.