# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
403637 | Wasrek | Swapping Cities (APIO20_swap) | C++14 | 135 ms | 11856 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>
#include "swap.h"
// #include"grader.cpp"
#include <vector>
#define SIZE 100010
#define MAX 2000000000
using namespace std;
struct A{
int u,w;
bool operator<(const A & o) const{
return w<o.w;
}
};
int n,sub2=1,sub1=1,cycle=1,ma=0,dis[3][3][SIZE];
A m1={MAX,MAX},m2={MAX,MAX},m3={MAX,MAX};
vector<A> g[SIZE];
struct DIJK{
int u,w,la,ch;
// nx node from x,ny node from y,mi min node path that between
bool operator <(const DIJK & o) const{
if(w!=o.w) return w>o.w;
//w==o.w
return ch<o.ch;
}
} now;
priority_queue< DIJK > h;
void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) {
n=N;
for(int i=0;i<M;i++){
g[U[i]].push_back({V[i],W[i]});
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |