Submission #319500

# Submission time Handle Problem Language Result Execution time Memory
319500 2020-11-05T12:24:23 Z VEGAnn Swapping Cities (APIO20_swap) C++14
0 / 100
2000 ms 364 KB
#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;

    while (1) {}

    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 time Memory Grader output
1 Execution timed out 2094 ms 364 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2094 ms 364 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2016 ms 364 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 2016 ms 364 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 2094 ms 364 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2016 ms 364 KB Time limit exceeded