Submission #1179152

#TimeUsernameProblemLanguageResultExecution timeMemory
1179152stdfloatCyberland (APIO23_cyberland)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "cyberland.h" #include "stub.cpp" using namespace std; #define ld long double #define ff first #define ss second #define pii pair<int, int> double solve(int n, int M, int K, int H, vector<int> x, vector<int> y, vector<int> c, vector<int> a) { vector<pii> E[n]; for (int i = 0; i < M; i++) { E[x[i]].push_back({y[i], c[i]}); E[y[i]].push_back({x[i], c[i]}); } priority_queue<pair<double, pii>> q; vector<vector<double>> dis(n, vector<double>(K + 1, 1e18)); q.push({0, {0, 0}}); dis[0][0] = 0; while (!q.empty()) { auto [d, x] = q.top(); d = -d; q.pop(); if (d - dis[x.ff][x.ss] > 1e-9) continue; for (auto [i, w] : E[x.ff]) { double nd = (!a[i] ? 0 : d + w); if (nd < dis[i][x.ss]) { dis[i][x.ss] = nd; q.push({nd, {i, x.ss}}); } if (a[i] == 2 && x.ss < K && nd < 2 * dis[i][x.ss]) { dis[i][x.ss] = nd / 2; q.push({nd / 2, {i, x.ss + 1}}); } } } double mn = 1e18; for (int i = 0; i <= K; i++) mn = min(mn, dis[H][i]); return (mn == 1e18 ? -1 : mn); }

Compilation message (stderr)

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