Submission #741816

# Submission time Handle Problem Language Result Execution time Memory
741816 2023-05-15T01:02:36 Z 1zaid1 Swapping Cities (APIO20_swap) C++17
0 / 100
2 ms 2652 KB
#include <bits/stdc++.h>
using namespace std;

const int M = 1e5+5;
vector<pair<int, int>> node[M];
vector<array<int, 3>> E;

int n, m;
int mx = 0, cycle = 3;
void init(int _n, int _m, vector<int> U, vector<int> V, vector<int> W) {
    n = _n, m = _m;
    for (int i = 0; i < m; i++) E.push_back({U[i], V[i], W[i]});
    for (auto [a, b, c]:E) 
        node[a].push_back({b, c}),
        node[b].push_back({a, c});
    for (int i = 0; i < n; i++) cycle = min(cycle, (int)node[i].size());
    for (auto [a, b, c]:E) mx = max(mx, c);
}


int getMinimumFuelCapacity(int X, int Y) {
    // int x = solve(X, Y);
    // if (x > 1e9) return -1;
    // return x+1;

    if (cycle) return mx;
    return -1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2652 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2652 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2652 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2652 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2652 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2652 KB Output isn't correct
2 Halted 0 ms 0 KB -