# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
983084 | lamthondeptrai | Robot (JOI21_ho_t4) | C++14 | 864 ms | 84316 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>
typedef long long ll;
using namespace std;
const ll INF = 1e18;
struct Edge {
int to, c;
ll p;
};
map<int, vector<Edge>> graph[100001];
ll dp[100001];
map<int, ll> dp2[100001], psum[100001];
int main() {
cin.tie(0)->sync_with_stdio(0);
int n, m;
cin >> n >> m;
for (int i = 1; i <= m; i++) {
int u, v, c;
ll p;
cin >> u >> v >> c >> p;
graph[u][c].push_back({v, c, p});
graph[v][c].push_back({u, c, p});
psum[u][c] += p;
psum[v][c] += p;
}
memset(dp, 0x3f, sizeof dp);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |