제출 #980116

#제출 시각아이디문제언어결과실행 시간메모리
980116vjudge1가장 긴 여행 (IOI23_longesttrip)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define rep(a,b,c) for(int a=b; a<c; a++) #define repa(a,b) for(auto a:b) #define ll long long #define pll pair<ll, ll> #define pb push_back #define fi first #define se second using namespace std; int longest_trip(int N, int D){ vector<int> ans; rep(i,0,N) ans.pb(i); return ans; }

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

longesttrip.cpp: In function 'int longest_trip(int, int)':
longesttrip.cpp:15:9: error: cannot convert 'std::vector<int>' to 'int' in return
   15 |  return ans;
      |         ^~~