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 = 100100;
int cnt[N], mx = 0;
void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) {
mx = 0;
for (int i = 0; i < M; i++){
cnt[U[i]]++;
cnt[V[i]]++;
mx = max(mx, W[i]);
}
for (int i = 0; i < N; i++)
if (cnt[i] < 2)
mx = -1;
}
int getMinimumFuelCapacity(int X, int Y) {
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... |