# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
375301 | 2021-03-09T07:09:14 Z | astoria | Swapping Cities (APIO20_swap) | C++14 | 0 ms | 0 KB |
#include "bits/stdc++.h" #include "swap.h" #include <vector> int mx; bool isM; void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) { mx=0; for(int i : W){ mx=max(mx,i); } isM=0; if(N==M) isM=1; } int getMinimumFuelCapacity(int X, int Y) { if(isM) return mx; else return -1; }