Submission #889154

#TimeUsernameProblemLanguageResultExecution timeMemory
889154Ghulam_JunaidRoller Coaster Railroad (IOI16_railroad)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll plan_roller_coaster (vector<ll> s, vector<ll> t){ ll n = s.size(); if (n == 1) return 0; vector<ll> all; for (ll i=0; i<n; i++) all.push_back(i); ll output = 2e18; do{ ll val = 0; for (ll i=1; i<n; i++){ val += max(0ll, (ll)(t[i - 1] - s[i])); } output = min(output, val); } while(next_permutation(all.begin(), all.end())); return output; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccxKZDzg.o: in function `main':
grader.cpp:(.text.startup+0xf4): 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