# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
291693 | nvmdava | Swapping Cities (APIO20_swap) | C++17 | 431 ms | 31768 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 "swap.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
const int INF = 1000000005;
#define ff first
#define ss second
vector<pair<int, pair<int, int> > > edge;
vector<pair<int, int> > dsu[N];
int ans[N];
int d[N];
vector<int> gr[N];
void init(int N, int M,
std::vector<int> U, std::vector<int> V, std::vector<int> W) {
cerr<<"BEGIN";
for(int i = 0; i < N; ++i)
ans[i] = INF;
for(int i = 0; i < N; ++i){
dsu[i].push_back({0, i});
gr[i].push_back(i);
}
for(int i = 0; i < M; ++i)
edge.push_back({W[i], {V[i], U[i]}});
sort(edge.begin(), edge.end());
for(auto& wtf : edge){
int v = wtf.ss.ff;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |