# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
375305 | 2021-03-09T07:13:59 Z | astoria | Swapping Cities (APIO20_swap) | C++14 | 1 ms | 492 KB |
#include "bits/stdc++.h" #include "swap.h" using namespace std; const int NN=100005; int len[NN]; multiset<int> s; void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) { for(int i=0; i<U.size(); i++){ int v = V[i]; len[v] = W[i]; s.insert(len[v]); } } int getMinimumFuelCapacity(int X, int Y) { int mx = max(len[X],len[Y]); s.erase(s.find(len[X])); s.erase(s.find(len[Y])); mx=max(mx, *s.begin()); s.insert(len[X]); s.insert(len[Y]); return mx; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 492 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 492 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 492 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 492 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 492 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 492 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |