Language: C++

#define rep(i,n) for(ll i=0;i<(n);i++)
int main(){
  ll n;cin>>n;
  vector<ll> v(n);
  rep(i,n) cin>>v[i];
  ll dp[n];
  rep(i,n) dp[i]=1e10;
  dp[0]=0;
  rep(i,n-1){
    rep(j,2){
      if(i>=j) dp[i+1]=min(dp[i+1],dp[i-j]+abs(v[i+1]-v[i-j]));
    }
  }
  cout<<dp[n-1]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'll' was not declared in this scope
    3 |   ll n;cin>>n;
      |   ^~
a.cc:3:8: error: 'cin' was not declared in this scope
    3 |   ll n;cin>>n;
      |        ^~~
a.cc:3:13: error: 'n' was not declared in this scope
    3 |   ll n;cin>>n;
      |             ^
a.cc:4:3: error: 'vector' was not declared in this scope
    4 |   vector<ll> v(n);
      |   ^~~~~~
a.cc:4:14: error: 'v' was not declared in this scope
    4 |   vector<ll> v(n);
      |              ^
a.cc:5:7: error: expected ';' before 'i'
    5 |   rep(i,n) cin>>v[i];
      |       ^
a.cc:1:25: note: in definition of macro 'rep'
    1 | #define rep(i,n) for(ll i=0;i<(n);i++)
      |                         ^
a.cc:5:7: error: 'i' was not declared in this scope
    5 |   rep(i,n) cin>>v[i];
      |       ^
a.cc:1:29: note: in definition of macro 'rep'
    1 | #define rep(i,n) for(ll i=0;i<(n);i++)
      |                             ^
a.cc:6:5: error: expected ';' before 'dp'
    6 |   ll dp[n];
      |     ^~~
      |     ;
a.cc:7:7: error: expected ';' before 'i'
    7 |   rep(i,n) dp[i]=1e10;
      |       ^
a.cc:1:25: note: in definition of macro 'rep'
    1 | #define rep(i,n) for(ll i=0;i<(n);i++)
      |                         ^
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   rep(i,n) dp[i]=1e10;
      |       ^
a.cc:1:29: note: in definition of macro 'rep'
    1 | #define rep(i,n) for(ll i=0;i<(n);i++)
      |                             ^
a.cc:7:12: error: 'dp' was not declared in this scope
    7 |   rep(i,n) dp[i]=1e10;
      |            ^~
a.cc:8:3: error: 'dp' was not declared in this scope
    8 |   dp[0]=0;
      |   ^~
a.cc:9:7: error: expected ';' before 'i'
    9 |   rep(i,n-1){
      |       ^
a.cc:1:25: note: in definition of macro 'rep'
    1 | #define rep(i,n) for(ll i=0;i<(n);i++)
      |                         ^
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   rep(i,n-1){
      |       ^
a.cc:1:29: note: in definition of macro 'rep'
    1 | #define rep(i,n) for(ll i=0;i<(n);i++)
      |                             ^
a.cc:10:9: error: expected ';' before 'j'
   10 |     rep(j,2){
      |         ^
a.cc:1:25: note: in definition of macro 'rep'
    1 | #define rep(i,n) for(ll i=0;i<(n);i++)
      |                         ^
a.cc:10:9: error: 'j' was not declared in this scope
   10 |     rep(j,2){
      |         ^
a.cc:1:29: note: in definition of macro 'rep'
    1 | #define rep(i,n) for(ll i=0;i<(n);i++)
      |                             ^
a.cc:11:44: error: 'abs' was not declared in this scope
   11 |       if(i>=j) dp[i+1]=min(dp[i+1],dp[i-j]+abs(v[i+1]-v[i-j]));
      |                                            ^~~
a.cc:11:24: error: 'min' was not declared in this scope; did you mean 'main'?
   11 |       if(i>=j) dp[i+1]=min(dp[i+1],dp[i-j]+abs(v[i+1]-v[i-j]));
      |                        ^~~
      |                        main
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout<<dp[n-1]<<endl;
      |   ^~~~
a.cc:14:18: error: 'endl' was not declared in this scope
   14 |   cout<<dp[n-1]<<endl;
      |                  ^~~~