# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
707491 | 2023-03-09T05:39:27 Z | josanneo22 | Swapping Cities (APIO20_swap) | C++17 | 1 ms | 296 KB |
//#include "swap.h" #include<bits/stdc++.h> #include <vector> using namespace std; vector<vector<pair<int,int>>> adj; long long sm = 0; int cycle = 1; void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) { int n, m; n = N; m = M; for (int i = 0; i < n; i++) { adj[U[i]].push_back(make_pair(V[i], W[i])); sm += (long long)W[i]; } for (int i = 0; i < n; i++) { if (adj[i].size() == 1) cycle = 0; } } int getMinimumFuelCapacity(int X, int Y) { if (cycle == 1) cout << sm << '\n'; else cout << "-1\n"; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 296 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 296 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 296 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 296 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 296 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 296 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |