제출 #261694

#제출 시각아이디문제언어결과실행 시간메모리
261694amallaRoller Coaster Railroad (IOI16_railroad)C++17
컴파일 에러
0 ms0 KiB
#include "railroad.h" #include<bits/stdc++.h> using namespace std; long long plan_roller_coaster(vector<long long> s, vector<long long> t) { long long n = (long long) s.size(), ans = 100000000000000; vector<pair<long long, long long> > S(n); for (int i = 0; i<n; ++i) { S[i].first = s[i]; S[i].second = t[i]; } do { long long need = 0; for (int i = 1; i<n; ++i) { if (S[i-1].second>S[i].first) need += S[i-1].second-S[i].first; } ans = min(need, ans); } while(next_permutation(S.begin(), S.end())); return ans; }

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

/tmp/cckrbt1g.o: In function `main':
grader.cpp:(.text.startup+0xe3): undefined reference to `plan_roller_coaster(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status