제출 #1238163

#제출 시각아이디문제언어결과실행 시간메모리
1238163CyberCow가장 긴 여행 (IOI23_longesttrip)C++20
컴파일 에러
0 ms0 KiB
#include "longesttrip.h" #include <vector> using namespace std; vector<int> longest_trip(int N, int D) { vector<int> ans; for (int i = 0; i < N; i++) { ans.push_back(i); } return; }

컴파일 시 표준 에러 (stderr) 메시지

longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:12:9: error: return-statement with no value, in function returning 'std::vector<int>' [-fpermissive]
   12 |         return;
      |         ^~~~~~