Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long;
ll n;
ll a[100001];
ll dp[100001];
ll frog(ll ind)
{
  if(ind == (n - 1)) return 0;
  if(ind >= n) return INT_MAX;
  if(dp[ind] != -1) return dp[ind];
  ll left = abs(a[ind] - a[ind + 1]) + frog(ind + 1);
  ll right = INT_MAX;
  if(ind + 2 < n){
  right = abs(a[ind] - a[ind + 2]) + frong(ind + 2);
  }
  dp[ind] = min(left , right);
  return dp[ind];
}
int main()
{
  cin>>n;
  for(ll i = 0 ;i < n;i++){
  cin>>a[i];
  }
  memset(dp,-1,sizeof(dp));
   cout<<frog(0);
  
}

Compiler output:
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:4:1: note: in expansion of macro 'll'
    4 | ll n;
      | ^~
a.cc:4:4: error: 'n' does not name a type
    4 | ll n;
      |    ^
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:5:1: note: in expansion of macro 'll'
    5 | ll a[100001];
      | ^~
a.cc:5:4: error: 'a' does not name a type
    5 | ll a[100001];
      |    ^
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:6:1: note: in expansion of macro 'll'
    6 | ll dp[100001];
      | ^~
a.cc:6:4: error: 'dp' does not name a type
    6 | ll dp[100001];
      |    ^~
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:7:1: note: in expansion of macro 'll'
    7 | ll frog(ll ind)
      | ^~
a.cc:3:21: error: expected ')' before ';' token
    3 | #define ll long long;
      |                     ^
a.cc:7:9: note: in expansion of macro 'll'
    7 | ll frog(ll ind)
      |         ^~
a.cc:7:8: note: to match this '('
    7 | ll frog(ll ind)
      |        ^
a.cc:3:21: error: expected constructor, destructor, or type conversion before ';' token
    3 | #define ll long long;
      |                     ^
a.cc:7:9: note: in expansion of macro 'll'
    7 | ll frog(ll ind)
      |         ^~
a.cc:7:12: error: 'ind' does not name a type; did you mean 'int'?
    7 | ll frog(ll ind)
      |            ^~~
      |            int
a.cc: In function 'int main()':
a.cc:22:8: error: 'n' was not declared in this scope; did you mean 'yn'?
   22 |   cin>>n;
      |        ^
      |        yn
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:23:7: note: in expansion of macro 'll'
   23 |   for(ll i = 0 ;i < n;i++){
      |       ^~
a.cc:23:10: error: 'i' was not declared in this scope
   23 |   for(ll i = 0 ;i < n;i++){
      |          ^
a.cc:23:22: error: expected ')' before ';' token
   23 |   for(ll i = 0 ;i < n;i++){
      |      ~               ^
      |                      )
a.cc:23:23: error: 'i' was not declared in this scope
   23 |   for(ll i = 0 ;i < n;i++){
      |                       ^
a.cc:26:10: error: 'dp' was not declared in this scope; did you mean 'dup'?
   26 |   memset(dp,-1,sizeof(dp));
      |          ^~
      |          dup
a.cc:27:10: error: 'frog' was not declared in this scope
   27 |    cout<<frog(0);
      |          ^~~~