Submission #741396

# Submission time Handle Problem Language Result Execution time Memory
741396 2023-05-14T03:22:06 Z vjudge1 Swapping Cities (APIO20_swap) C++17
6 / 100
143 ms 16876 KB
#include "swap.h"

#include <bits/stdc++.h>
using namespace std;

const int N = 1e5 + 5;
const int M = 2e5 + 5;
int n, m;
array<int, 3> edge[M];
vector <pair<int, int>> a[N];
int ma = 0;

void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) {
  n = N; m = M;
  for(int i = 0; i < m; ++i){
    edge[i] = {U[i], V[i], W[i]};
    ma = max(ma, W[i]);
    a[U[i]].push_back({V[i], W[i]});
    a[V[i]].push_back({U[i], W[i]});
  }
}

int getMinimumFuelCapacity(int X, int Y) {
  if (n == m + 1){
    return -1;
  } else {
    return ma;
  }
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 3 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 2644 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Correct 35 ms 7812 KB Output is correct
10 Correct 60 ms 9032 KB Output is correct
11 Correct 56 ms 8944 KB Output is correct
12 Correct 63 ms 9260 KB Output is correct
13 Correct 48 ms 9304 KB Output is correct
14 Correct 43 ms 7940 KB Output is correct
15 Correct 107 ms 10884 KB Output is correct
16 Correct 109 ms 10740 KB Output is correct
17 Correct 116 ms 10972 KB Output is correct
18 Correct 143 ms 10976 KB Output is correct
19 Correct 59 ms 7116 KB Output is correct
20 Correct 110 ms 16172 KB Output is correct
21 Correct 109 ms 16324 KB Output is correct
22 Correct 130 ms 16852 KB Output is correct
23 Correct 117 ms 16876 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Incorrect 89 ms 11312 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 3 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 2644 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Incorrect 2 ms 2644 KB Output isn't correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 3 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 2644 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Correct 35 ms 7812 KB Output is correct
10 Correct 60 ms 9032 KB Output is correct
11 Correct 56 ms 8944 KB Output is correct
12 Correct 63 ms 9260 KB Output is correct
13 Correct 48 ms 9304 KB Output is correct
14 Correct 43 ms 7940 KB Output is correct
15 Correct 107 ms 10884 KB Output is correct
16 Correct 109 ms 10740 KB Output is correct
17 Correct 116 ms 10972 KB Output is correct
18 Correct 143 ms 10976 KB Output is correct
19 Incorrect 89 ms 11312 KB Output isn't correct
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -