# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
917757 | 406 | Robot (JOI21_ho_t4) | C++17 | 3047 ms | 172864 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 int int64_t
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
using namespace std;
using ar = array<int, 2>;
using ar3 = array<int, 3>;
const int64_t INF = 1ll << 60;
const int N = 2e5 + 5;
vector<ar3> adj[N];
int n, m, C[N], d[N], cnt[N], sum[N];
ar last[N];
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n >> m;
FOR(i, 0, m) {
int u, v, c, p;
cin >> u >> v >> c >> p;
--u, --v;
adj[v].push_back({u, c, p});
adj[u].push_back({v, c, p});
}
fill(last, last + N, ar{-1, -1});
vector<array<int, 4>> E;
FOR(i, 0, n) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |