# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1159957 | BentoOreo | Cyberland (APIO23_cyberland) | C++20 | 2625 ms | 136520 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<long long int, long long int>;
const int inf = numeric_limits<int>::max();
const ll INF = numeric_limits<ll>::max();
const char sp = ' ';
const char nl = '\n';
/*
General Ideas
From Discord:
1) We can make use of the zeros by dijkstra'sing from H to any point that ends in zero.
2) Check which nodes are reachable from the source. Which is "legit" nodes we can use
Idea
1) DP+Dijkstra distance holding
K <- number of div/2s operations i used
why?
Div 2 cause dijkstra's to fail. Because values marked visited can actually have shorter paths if I visit a future node
and that has a div2 ability and go back to another I just was certain of finding the shortest path of.
So modifed dijkstras (d, node, k uses) and just dist[node] fails
First things:
Mark all nodes reachable from 0
Dijsktra's from H
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |