Language: C++

#include <bits/stdc++.h>
using namespace std;

#define lli long long int;

vector<lli> v;
lli n;
vector<lli> mem;

lli sol(int i,int j) {
	if(j == n) return abs(v[j]-v[i]);
	if(j > n) return 1 << 30;
	if(mem[j] != -1) return mem[j];
	return mem[j] = min(sol(j,j+1),sol(j,j+2)) + abs(v[j]-v[i]);
}

int main() {
	cin>>n;
	v = vector<lli>(n+1);
	mem = vector<lli>(n+1,-1);
	int i = 0;
	while(i < n) cin>> v[1 + i++];
	cout<<sol(1,1)<<'\n';
}

Compiler output:
a.cc:4:23: error: template argument 1 is invalid
    4 | #define lli long long int;
      |                       ^~~
a.cc:6:8: note: in expansion of macro 'lli'
    6 | vector<lli> v;
      |        ^~~
a.cc:4:23: error: template argument 2 is invalid
    4 | #define lli long long int;
      |                       ^~~
a.cc:6:8: note: in expansion of macro 'lli'
    6 | vector<lli> v;
      |        ^~~
a.cc:6:11: error: expected unqualified-id before '>' token
    6 | vector<lli> v;
      |           ^
a.cc:4:23: error: declaration does not declare anything [-fpermissive]
    4 | #define lli long long int;
      |                       ^~~
a.cc:7:1: note: in expansion of macro 'lli'
    7 | lli n;
      | ^~~
a.cc:7:5: error: 'n' does not name a type
    7 | lli n;
      |     ^
a.cc:4:23: error: template argument 1 is invalid
    4 | #define lli long long int;
      |                       ^~~
a.cc:8:8: note: in expansion of macro 'lli'
    8 | vector<lli> mem;
      |        ^~~
a.cc:4:23: error: template argument 2 is invalid
    4 | #define lli long long int;
      |                       ^~~
a.cc:8:8: note: in expansion of macro 'lli'
    8 | vector<lli> mem;
      |        ^~~
a.cc:8:11: error: expected unqualified-id before '>' token
    8 | vector<lli> mem;
      |           ^
a.cc:4:23: error: declaration does not declare anything [-fpermissive]
    4 | #define lli long long int;
      |                       ^~~
a.cc:10:1: note: in expansion of macro 'lli'
   10 | lli sol(int i,int j) {
      | ^~~
a.cc:10:5: error: ISO C++ forbids declaration of 'sol' with no type [-fpermissive]
   10 | lli sol(int i,int j) {
      |     ^~~
a.cc: In function 'int sol(int, int)':
a.cc:11:17: error: 'n' was not declared in this scope
   11 |         if(j == n) return abs(v[j]-v[i]);
      |                 ^
a.cc:11:31: error: 'v' was not declared in this scope
   11 |         if(j == n) return abs(v[j]-v[i]);
      |                               ^
a.cc:12:16: error: 'n' was not declared in this scope
   12 |         if(j > n) return 1 << 30;
      |                ^
a.cc:13:12: error: 'mem' was not declared in this scope
   13 |         if(mem[j] != -1) return mem[j];
      |            ^~~
a.cc:14:16: error: 'mem' was not declared in this scope
   14 |         return mem[j] = min(sol(j,j+1),sol(j,j+2)) + abs(v[j]-v[i]);
      |                ^~~
a.cc:14:58: error: 'v' was not declared in this scope
   14 |         return mem[j] = min(sol(j,j+1),sol(j,j+2)) + abs(v[j]-v[i]);
      |                                                          ^
a.cc: In function 'int main()':
a.cc:18:14: error: 'n' was not declared in this scope; did you mean 'yn'?
   18 |         cin>>n;
      |              ^
      |              yn
a.cc:19:9: error: 'v' was not declared in this scope
   19 |         v = vector<lli>(n+1);
      |         ^
a.cc:4:23: error: template argument 1 is invalid
    4 | #define lli long long int;
      |                       ^~~
a.cc:19:20: note: in expansion of macro 'lli'
   19 |         v = vector<lli>(n+1);
      |                    ^~~
a.cc:4:23: error: template argument 2 is invalid
    4 | #define lli long long int;
      |                       ^~~
a.cc:19:20: note: in expansion of macro 'lli'
   19 |         v = vector<lli>(n+1);
      |                    ^~~
a.cc:19:23: error: expected primary-expression before '>' token
   19 |         v = vector<lli>(n+1);
      |                       ^
a.cc:20:9: error: 'mem' was not declared in this scope
   20 |         mem = vector<lli>(n+1,-1);
      |         ^~~
a.cc:4:23: error: template argument 1 is invalid
    4 | #define lli long long int;
      |                       ^~~
a.cc:20:22: note: in expansion of macro 'lli'
   20 |         mem = vector<lli>(n+1,-1);
      |                      ^~~
a.cc:4:23: error: template argument 2 is invalid
    4 | #define lli long long int;
      |                       ^~~
a.cc:20:22: note: in expansion of macro 'lli'
   20 |         mem = vector<lli>(n+1,-1);
      |                      ^~~
a.cc:20:25: error: expected primary-expression before '>' token
   20 |         mem = vector<lli>(n+1,-1);
      |                         ^