# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
722890 | The_Samurai | Stranded Far From Home (BOI22_island) | C++17 | 1072 ms | 23808 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2")
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
int INF = 2e9;
int n, m, mx;
vector<vector<int>> g;
vector<bool> vis;
vector<int> a;
bool check(int i) {
int sum = a[i];
if (sum >= mx) return true;
priority_queue<pair<int, int>> pq;
set<int> st = {i};
vector<int> way = {i};
for (int u : g[i]) {
st.insert(u);
pq.push({-a[u], u});
}
while (!pq.empty()) {
auto [need, u] = pq.top();
pq.pop();
need = -need;
if (sum < need) break;
way.emplace_back(u);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |