제출 #1059851

#제출 시각아이디문제언어결과실행 시간메모리
1059851epicci23가장 긴 여행 (IOI23_longesttrip)C++17
컴파일 에러
0 ms0 KiB
#include "bits/stdc++.h" //#define int long long #define all(v) v.begin() , v.end() #define sz(a) (int)a.size() using namespace std; #include "longesttrip.h" vector<int> longest_trip(int N, int D){ if(D==3){ vector<int> res(n,0); iota(all(res),0); return res; } if(D==2){ } } /*void _(){ } int32_t main(){ cin.tie(0); ios::sync_with_stdio(0); int tc=1;//cin >> tc; while(tc--) _(); return 0; }*/

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

longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:10:20: error: 'n' was not declared in this scope
   10 |    vector<int> res(n,0);
      |                    ^
longesttrip.cpp:17:1: warning: control reaches end of non-void function [-Wreturn-type]
   17 | }
      | ^