Submission #568205

#TimeUsernameProblemLanguageResultExecution timeMemory
568205definitelynotmeeShortcut (IOI16_shortcut)C++98
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define ff first #define ss second #define all(x) x.begin(),x.end() using ll = long long; using pii = pair<int,int>; using pll = pair<ll,ll>; template<typename T> using matrix = vector<vector<T>>; const ll INFL = (1ll<<62); ll plan_roller_coaster(vector<int> s, vector<int>t){ int n = s.size(); matrix<ll> dp(1<<n,vector<ll>(n,INFL)); for(int i = 0; i < n; i++){ dp[1<<i][i] = 0; } for(int i = 0; i < (1<<n); i++){ for(int j = 0; j < n; j++){ for(int k = 0; k < n; k++){ if(!(k&i)) continue; dp[i][k] = min(dp[i][k],dp[i^k][j]+max(0,t[j]-s[i])); } } } return *min_element(all(dp[(1<<n)-1])); }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccNMVaOp.o: in function `main':
grader.cpp:(.text.startup+0x124): undefined reference to `find_shortcut(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int)'
collect2: error: ld returned 1 exit status