제출 #735412

#제출 시각아이디문제언어결과실행 시간메모리
735412keisuke6자매 도시 (APIO20_swap)C++14
컴파일 에러
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; }

컴파일 시 표준 에러 (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());
      |                      ^~~~~~~~~~~