# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
383556 | valerikk | Robot (JOI21_ho_t4) | C++17 | 1295 ms | 155216 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>
using namespace std;
#define ll long long
const ll INF = 1e18;
const int N = 101010, M = 202020;
const int V = 2020202;
int n, m;
struct edge {
int a, b, c;
ll p;
} e[2 * M];
vector<ll> sum[N];
vector<pair<ll, int>> g[V];
int cnt;
ll d[V];
vector<int> cs[N], vv[N];
int an[N], sz[N];
void go(int st) {
for (int i = 0; i < cnt; i++) d[i] = INF;
priority_queue<pair<ll, int>, vector<pair<ll, int>>, greater<pair<ll, int>>> q;
d[st] = 0;
q.push({d[st], st});
while (!q.empty()) {
auto t = q.top();
q.pop();
int v = t.second;
if (t.first != d[v]) continue;
for (auto p : g[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... |