Submission #403687

# Submission time Handle Problem Language Result Execution time Memory
403687 2021-05-13T11:16:44 Z aryan12 Swapping Cities (APIO20_swap) C++17
6 / 100
111 ms 8744 KB
#include "swap.h"
#include <bits/stdc++.h>
using namespace std;

bool f = false;
int maxWeight = 0;

void init(int N, int M, vector<int> U, vector<int> V, vector<int> W) {
    maxWeight = 0;
    for(int i = 0; i < W.size(); i++) {
      maxWeight = max(maxWeight, W[i]);
    }
    if(N == M)
      f = true;
}

int getMinimumFuelCapacity(int X, int Y) {
    if(f)
      return maxWeight;
    return -1;
}

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 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 332 KB Output is correct
8 Correct 1 ms 300 KB Output is correct
9 Correct 31 ms 3756 KB Output is correct
10 Correct 35 ms 4320 KB Output is correct
11 Correct 34 ms 4308 KB Output is correct
12 Correct 40 ms 4476 KB Output is correct
13 Correct 38 ms 4404 KB Output is correct
14 Correct 47 ms 4036 KB Output is correct
15 Correct 98 ms 7192 KB Output is correct
16 Correct 98 ms 7064 KB Output is correct
17 Correct 101 ms 7288 KB Output is correct
18 Correct 111 ms 6900 KB Output is correct
19 Correct 60 ms 5900 KB Output is correct
20 Correct 102 ms 7840 KB Output is correct
21 Correct 105 ms 8448 KB Output is correct
22 Correct 107 ms 8724 KB Output is correct
23 Correct 105 ms 8744 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Incorrect 96 ms 7952 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 332 KB Output is correct
8 Correct 1 ms 300 KB Output is correct
9 Incorrect 1 ms 204 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 332 KB Output is correct
8 Correct 1 ms 300 KB Output is correct
9 Correct 31 ms 3756 KB Output is correct
10 Correct 35 ms 4320 KB Output is correct
11 Correct 34 ms 4308 KB Output is correct
12 Correct 40 ms 4476 KB Output is correct
13 Correct 38 ms 4404 KB Output is correct
14 Correct 47 ms 4036 KB Output is correct
15 Correct 98 ms 7192 KB Output is correct
16 Correct 98 ms 7064 KB Output is correct
17 Correct 101 ms 7288 KB Output is correct
18 Correct 111 ms 6900 KB Output is correct
19 Incorrect 96 ms 7952 KB Output isn't correct
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct