# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
532065 | amunduzbaev | Robot (JOI21_ho_t4) | C++17 | 857 ms | 86204 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 ar array
#define int long long
const int N = 1e5 + 5;
struct node{
int a, b, c, p;
};
map<int, vector<ar<int, 2>>> edges[N], ee[N];
map<int, int> ss[N], uu[N];
int d[N], used[N];
node e[N];
signed main(){
ios::sync_with_stdio(0); cin.tie(0);
int n, m; cin>>n>>m;
for(int i=0;i<m;i++){
node& x = e[i]; cin>>x.a>>x.b>>x.c>>x.p;
edges[x.a][x.c].push_back({x.b, x.p});
edges[x.b][x.c].push_back({x.a, x.p});
ee[x.a][x.c].push_back({x.b, x.p});
ee[x.b][x.c].push_back({x.a, x.p});
ss[x.a][x.c] += x.p;
ss[x.b][x.c] += x.p;
}
priority_queue<ar<int, 4>, vector<ar<int, 4>>, greater<ar<int, 4>>> q;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |