Submission #319445

#TimeUsernameProblemLanguageResultExecution timeMemory
319445VEGAnnSwapping Cities (APIO20_swap)C++14
6 / 100
127 ms10704 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...