제출 #366323

#제출 시각아이디문제언어결과실행 시간메모리
366323dennisstar모임들 (IOI18_meetings)C++17
컴파일 에러
0 ms0 KiB
#include "wiring.h" #include <bits/stdc++.h> #define fi first #define se second using namespace std; using ll = long long; const ll INF = 1e18; ll min_total_length(vector<int> R, vector<int> B) { int N, M; N=R.size(); M=B.size(); vector<pair<int, int>> P; for (auto &i:R) P.emplace_back(i, 1); for (auto &i:B) P.emplace_back(i, -1); sort(P.begin(), P.end()); reverse(R.begin(), R.end()); reverse(B.begin(), B.end()); int x=M; ll r=-INF, b=-INF, D=0, S=0; vector<pair<ll, ll>> lst(N+M+1, {INF, INF}); lst[M]={0, 0}; for (auto &i:P) { ll E=0; (i.se==1?R:B).pop_back(); x+=i.se; S+=i.fi*i.se; if (i.se==1) { r=i.fi; E=D+i.fi-b; if (B.size()) E=min(E, D+B.back()-i.fi); } if (i.se==-1) { b=i.fi; E=D+i.fi-r; if (R.size()) E=min(E, D+R.back()-i.fi); } D=min(E, lst[x].fi+abs(lst[x].se-S)); lst[x]={D, S}; } return D; }

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

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