Submission #735412

#TimeUsernameProblemLanguageResultExecution timeMemory
735412keisuke6Swapping Cities (APIO20_swap)C++14
Compilation error
0 ms0 KiB
#include "swap.h" #include <vector> using namespace std; void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) { } int getMinimumFuelCapacity(int X, int Y) { if(N == M) return *max_element(W.begin(),W.end()); else return -1; }

Compilation message (stderr)

swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:11:6: error: 'N' was not declared in this scope
   11 |   if(N == M) return *max_element(W.begin(),W.end());
      |      ^
swap.cpp:11:11: error: 'M' was not declared in this scope
   11 |   if(N == M) return *max_element(W.begin(),W.end());
      |           ^
swap.cpp:11:34: error: 'W' was not declared in this scope
   11 |   if(N == M) return *max_element(W.begin(),W.end());
      |                                  ^
swap.cpp:11:22: error: 'max_element' was not declared in this scope
   11 |   if(N == M) return *max_element(W.begin(),W.end());
      |                      ^~~~~~~~~~~