Submission #342790

# Submission time Handle Problem Language Result Execution time Memory
342790 2021-01-02T20:11:15 Z aryan12 Swapping Cities (APIO20_swap) C++17
6 / 100
186 ms 10324 KB
#include <bits/stdc++.h>
using namespace std;
#include "swap.h"
int n, m;
int maxx = 0;

void init(int N, int M, vector<int> U, vector<int> V, vector<int> W) {
    n = N;
    m = M;
    for(int i = 0; i < W.size(); i++) {
        maxx = max(maxx, W[i]);
    }
}

int getMinimumFuelCapacity(int X, int Y) {
    if(m == n - 1)
        return -1;
    return maxx;
}

Compilation message

swap.cpp: In function 'void init(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
swap.cpp:10:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |     for(int i = 0; i < W.size(); i++) {
      |                    ~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 29 ms 2284 KB Output is correct
10 Correct 33 ms 2540 KB Output is correct
11 Correct 40 ms 2652 KB Output is correct
12 Correct 35 ms 2796 KB Output is correct
13 Correct 36 ms 2796 KB Output is correct
14 Correct 34 ms 2412 KB Output is correct
15 Correct 97 ms 4600 KB Output is correct
16 Correct 103 ms 4636 KB Output is correct
17 Correct 103 ms 4564 KB Output is correct
18 Correct 99 ms 4692 KB Output is correct
19 Correct 61 ms 4276 KB Output is correct
20 Correct 111 ms 9840 KB Output is correct
21 Correct 186 ms 10020 KB Output is correct
22 Correct 109 ms 10324 KB Output is correct
23 Correct 115 ms 10232 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Incorrect 123 ms 4624 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 29 ms 2284 KB Output is correct
10 Correct 33 ms 2540 KB Output is correct
11 Correct 40 ms 2652 KB Output is correct
12 Correct 35 ms 2796 KB Output is correct
13 Correct 36 ms 2796 KB Output is correct
14 Correct 34 ms 2412 KB Output is correct
15 Correct 97 ms 4600 KB Output is correct
16 Correct 103 ms 4636 KB Output is correct
17 Correct 103 ms 4564 KB Output is correct
18 Correct 99 ms 4692 KB Output is correct
19 Incorrect 123 ms 4624 KB Output isn't correct
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct