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;
vector<vector<pair<int,int>>> al;
int mx=0;
int n,m;
void init(int N, int M,
vector<int> U, vector<int> V, vector<int> W) {
al.assign(N+1,vector<pair<int,int>>());
for (int i=0; i<M; i++) {
al[U[i]].push_back({V[i],W[i]});
al[V[i]].push_back({U[i],W[i]});
mx=max(mx,W[i]);
}
n=N;
m=M;
}
int getMinimumFuelCapacity(int X, int Y) {
if (m==n-1) return -1;
return mx;
}
# | 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... |