# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1022963 | sinatbtfard | Robot (JOI21_ho_t4) | C++17 | 1534 ms | 144380 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.
#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
using namespace std;
struct edge{
int u, c;
ll p;
edge(int _u, int _c, ll _p) : u(_u), c(_c), p(_p) {}
};
int n, m;
vector <map <int, vector <edge>>> adj;
vector <map <int, ll>> dist, sum;
set <pair <ll, pair <int, int>>> s;
void dijkstra (){
s.insert({0, {1, 0}});
while (s.size()) {
ll d = (*s.begin()).F;
auto [v, c] = (*s.begin()).S;
s.erase(s.begin());
if (dist[v].count(c) && dist[v][c] <= d)
continue;
dist[v][c] = d;
if (!c){
for (auto Color : adj[v]) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |