Language: C++

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

#define int int int
#define pi pair<int,int>
#define pb push_back
#define fi first
#define se second
#define inf 1e18
#define endl '\n'
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define FILEIO(name) \
    freopen(name".in","r",stdin); \
    freopen(name".out","w",stdout);

const int N=100005;
int l[N];
int dp[N];

signed main()
{
    IOS;
    int n,k;
    cin>>n>>k;
    for (int i=0;i<n;i++) cin>>l[i];
    for (int i=0;i<n;i++)
    {
      int temp=inf;
      for (int i=1;i<=min(k,i);i++)
      {
        temp=min(temp,dp[i-j]+abs(l[i]-l[i-j]));
      }
      dp[i]=temp;
    }
    cout<<dp[n-1]<<endl;
    return 0;
}

Compiler output:
a.cc:16:1: error: two or more data types in declaration of 'N'
   16 | const int N=100005;
      | ^~~~~
a.cc:17:7: error: 'N' was not declared in this scope
   17 | int l[N];
      |       ^
a.cc:4:13: error: two or more data types in declaration of 'l'
    4 | #define int int int
      |             ^~~
a.cc:17:1: note: in expansion of macro 'int'
   17 | int l[N];
      | ^~~
a.cc:18:8: error: 'N' was not declared in this scope
   18 | int dp[N];
      |        ^
a.cc:4:13: error: two or more data types in declaration of 'dp'
    4 | #define int int int
      |             ^~~
a.cc:18:1: note: in expansion of macro 'int'
   18 | int dp[N];
      | ^~~
a.cc: In function 'int main()':
a.cc:4:13: error: two or more data types in declaration of 'n'
    4 | #define int int int
      |             ^~~
a.cc:23:5: note: in expansion of macro 'int'
   23 |     int n,k;
      |     ^~~
a.cc:4:13: error: two or more data types in declaration of 'k'
    4 | #define int int int
      |             ^~~
a.cc:23:5: note: in expansion of macro 'int'
   23 |     int n,k;
      |     ^~~
a.cc:24:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   24 |     cin>>n>>k;
      |          ^
      |          yn
a.cc:24:13: error: 'k' was not declared in this scope
   24 |     cin>>n>>k;
      |             ^
a.cc:4:13: error: two or more data types in declaration of 'i'
    4 | #define int int int
      |             ^~~
a.cc:25:10: note: in expansion of macro 'int'
   25 |     for (int i=0;i<n;i++) cin>>l[i];
      |          ^~~
a.cc:25:18: error: 'i' was not declared in this scope; did you mean 'fi'?
   25 |     for (int i=0;i<n;i++) cin>>l[i];
      |                  ^
      |                  fi
a.cc:25:32: error: 'l' was not declared in this scope
   25 |     for (int i=0;i<n;i++) cin>>l[i];
      |                                ^
a.cc:4:13: error: two or more data types in declaration of 'i'
    4 | #define int int int
      |             ^~~
a.cc:26:10: note: in expansion of macro 'int'
   26 |     for (int i=0;i<n;i++)
      |          ^~~
a.cc:26:18: error: 'i' was not declared in this scope; did you mean 'fi'?
   26 |     for (int i=0;i<n;i++)
      |                  ^
      |                  fi
a.cc:4:13: error: two or more data types in declaration of 'temp'
    4 | #define int int int
      |             ^~~
a.cc:28:7: note: in expansion of macro 'int'
   28 |       int temp=inf;
      |       ^~~
a.cc:4:13: error: two or more data types in declaration of 'i'
    4 | #define int int int
      |             ^~~
a.cc:29:12: note: in expansion of macro 'int'
   29 |       for (int i=1;i<=min(k,i);i++)
      |            ^~~
a.cc:31:9: error: 'temp' was not declared in this scope; did you mean 'tm'?
   31 |         temp=min(temp,dp[i-j]+abs(l[i]-l[i-j]));
      |         ^~~~
      |         tm
a.cc:31:23: error: 'dp' was not declared in this scope; did you mean 'dup'?
   31 |         temp=min(temp,dp[i-j]+abs(l[i]-l[i-j]));
      |                       ^~
      |                       dup
a.cc:31:28: error: 'j' was not declared in this scope; did you mean 'jn'?
   31 |         temp=min(temp,dp[i-j]+abs(l[i]-l[i-j]));
      |                            ^
      |                            jn
a.cc:31:35: error: 'l' was not declared in this scope
   31 |         temp=min(temp,dp[i-j]+abs(l[i]-l[i-j]));
      |                                   ^
a.cc:33:7: error: 'dp' was not declared in this scope; did you mean 'dup'?
   33 |       dp[i]=temp;
      |       ^~
      |       dup
a.cc:33:13: error: 'temp' was not declared in this scope; did you mean 'tm'?
   33 |       dp[i]=temp;
      |             ^~~~
      |             tm
a.cc:35:11: error: 'dp' was not declared in this scope; did you mean 'dup'?
   35 |     cout<<dp[n-1]<<endl;
      |           ^~
      |           dup