Submission #979487

#TimeUsernameProblemLanguageResultExecution timeMemory
979487ducksaysquackSwapping Cities (APIO20_swap)C++17
Compilation error
0 ms0 KiB
#include "swap.h"
#include <bits/stdc++.h>
#define int long long
using namespace std;
bool yes = true;
void init(int n, int m, vector<int> u, vector<int> v, vector<int> w) {
	yes = n == m;
}
int getMinimumFuelCapacity(int x, int y) {
	return yes? max_element(begin(w),end(w)):-1;
}

Compilation message (stderr)

swap.cpp: In function 'long long int getMinimumFuelCapacity(long long int, long long int)':
swap.cpp:10:32: error: 'w' was not declared in this scope
   10 |  return yes? max_element(begin(w),end(w)):-1;
      |                                ^