Submission #1060996

# Submission time Handle Problem Language Result Execution time Memory
1060996 2024-08-16T05:19:40 Z stdfloat Cyberland (APIO23_cyberland) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include "cyberland.h"
#include "stub.cpp"
using namespace std;

#define ld long double

double solve(int n, int M, int K, int H, vector<int> X, vector<int> Y, vector<int> C, vector<int> a) {
    vector<vector<ld>> dp(H + 1, vector<ld>(K + 1, 1e18));
    dp[0][0] = 0;
    for (int i = 1; i <= H; i++) {
        for (int j = 0; j <= K; j++) {
            dp[i][j] = min(dp[i][j], dp[i - 1][j] + C[i - 1]);
            if (j && a[i] == 2) dp[i][j] = min(dp[i][j], (dp[i][j - 1] + C[i - 1]) / 2);
        }
    }

    return *min_element(dp[H].begin(), dp[H].end());
}

Compilation message

cyberland.cpp:3:10: fatal error: stub.cpp: No such file or directory
    3 | #include "stub.cpp"
      |          ^~~~~~~~~~
compilation terminated.