Submission #1059851

# Submission time Handle Problem Language Result Execution time Memory
1059851 2024-08-15T08:41:51 Z epicci23 Longest Trip (IOI23_longesttrip) C++17
Compilation error
0 ms 0 KB
#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;
}*/

Compilation message

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 | }
      | ^