Submission #342788

# Submission time Handle Problem Language Result Execution time Memory
342788 2021-01-02T20:10:41 Z aryan12 Swapping Cities (APIO20_swap) C++17
0 / 100
1 ms 512 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(n == m - 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 Incorrect 1 ms 512 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 512 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 364 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 364 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 512 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 364 KB Output isn't correct