답안 #568206

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
568206 2022-05-24T22:30:04 Z definitelynotmee Shortcut (IOI16_shortcut) C++
컴파일 오류
0 ms 0 KB
#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(int n, vector<int> s, vector<int>t){
    
    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

/usr/bin/ld: /tmp/cc9pLKxn.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