Submission #1225963

#TimeUsernameProblemLanguageResultExecution timeMemory
1225963Godgift42Swapping Cities (APIO20_swap)C++20
Compilation error
0 ms0 KiB
#include "swap.h"
#include <bits/stdc++.h>
#include <vector>
using namespace std;
int n;
int m;
int ma=0;
void init(int N, int M,
          std::vector<int> U, std::vector<int> V, std::vector<int> W) {
  m=M;
  n=N;
  kath.resize(N);
  for(int i=0;i<M;i++){
    ma=max(ma,W[i]);
  }
}

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

Compilation message (stderr)

swap.cpp: In function 'void init(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
swap.cpp:12:3: error: 'kath' was not declared in this scope
   12 |   kath.resize(N);
      |   ^~~~