Submission #735416

#TimeUsernameProblemLanguageResultExecution timeMemory
735416keisuke6Swapping Cities (APIO20_swap)C++14
Compilation error
0 ms0 KiB
#include "swap.h" #include <vector> using namespace std; int N,M; vector<int> U,V,W; void init(int NN, int MM, std::vector<int> UU, std::vector<int> VV, std::vector<int> WW) { N = NN; M = MM; U = UU; V = VV; W = WW; } 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:17:22: error: 'max_element' was not declared in this scope
   17 |   if(N == M) return *max_element(W.begin(),W.end());
      |                      ^~~~~~~~~~~