Language: C++

#pragma GCC optimize("Ofast")
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<iostream>
#include<queue>
#include<vector>
#include <bitset>
#include <cmath>
#include <limits>
#include <iostream>
#include <map>
#include<tuple>
using namespace std;
#define INF 1LL<<62
#define MAX 100000
#define MOD 1000000007
typedef long long ll;
typedef pair<int,int> P;
typedef pair<pair<int,int>,int> p;
#define bit(n,k) ((n>>k)&1) /*nのk bit目*/
#define rad_to_deg(rad) (((rad)/2/M_PI)*360)
struct edge{ll to,cost,val;};
template<class T,class U>bool chmin(T&a,const U&b){if(a<=b)return false;a=b;return true;}
template<class T,class U>bool chmax(T&a,const U&b){if(a>=b)return false;a=b;return true;}
//__builtin_popcount(S);
//C.erase(unique(C.begin(),C.end()),C.end());
#define int ll;

ll dp[110][110000],sum[110][110000];
int a[110000];

signed main(){
    int N,K;
    cin>>N>>K;
    for(int i=1;i<=N;i++) cin>>a[i];

    for(int i=0;i<110;i++){
        dp[i][0]=1;
        sum[i][0]=1;
    } 

    for(int i=0;i<110000;i++) sum[0][i]=1;

    for(int i=1;i<=N;i++){
        int x=a[i];
        for(int j=1;j<=K;j++){
            if(j-x-1<0) dp[i][j]=sum[i-1][j];
            else dp[i][j]=sum[i-1][j]-sum[i-1][j-x-1];
            dp[i][j]%=MOD;
            sum[i][j]=sum[i][j-1]+dp[i][j];
            sum[i][j]%=MOD;
        }
    }
    cout<<dp[N][K]<<endl;
}

Compiler output:
a.cc:28:13: error: declaration does not declare anything [-fpermissive]
   28 | #define int ll;
      |             ^~
a.cc:31:1: note: in expansion of macro 'int'
   31 | int a[110000];
      | ^~~
a.cc:31:5: error: 'a' does not name a type
   31 | int a[110000];
      |     ^
a.cc: In function 'int main()':
a.cc:28:13: error: declaration does not declare anything [-fpermissive]
   28 | #define int ll;
      |             ^~
a.cc:34:5: note: in expansion of macro 'int'
   34 |     int N,K;
      |     ^~~
a.cc:34:9: error: 'N' was not declared in this scope
   34 |     int N,K;
      |         ^
a.cc:34:11: error: 'K' was not declared in this scope
   34 |     int N,K;
      |           ^
a.cc:28:13: error: declaration does not declare anything [-fpermissive]
   28 | #define int ll;
      |             ^~
a.cc:36:9: note: in expansion of macro 'int'
   36 |     for(int i=1;i<=N;i++) cin>>a[i];
      |         ^~~
a.cc:36:13: error: 'i' was not declared in this scope
   36 |     for(int i=1;i<=N;i++) cin>>a[i];
      |             ^
a.cc:36:21: error: expected ')' before ';' token
   36 |     for(int i=1;i<=N;i++) cin>>a[i];
      |        ~            ^
      |                     )
a.cc:36:22: error: 'i' was not declared in this scope
   36 |     for(int i=1;i<=N;i++) cin>>a[i];
      |                      ^
a.cc:28:13: error: declaration does not declare anything [-fpermissive]
   28 | #define int ll;
      |             ^~
a.cc:38:9: note: in expansion of macro 'int'
   38 |     for(int i=0;i<110;i++){
      |         ^~~
a.cc:38:22: error: expected ')' before ';' token
   38 |     for(int i=0;i<110;i++){
      |        ~             ^
      |                      )
a.cc:28:13: error: declaration does not declare anything [-fpermissive]
   28 | #define int ll;
      |             ^~
a.cc:43:9: note: in expansion of macro 'int'
   43 |     for(int i=0;i<110000;i++) sum[0][i]=1;
      |         ^~~
a.cc:43:25: error: expected ')' before ';' token
   43 |     for(int i=0;i<110000;i++) sum[0][i]=1;
      |        ~                ^
      |                         )
a.cc:28:13: error: declaration does not declare anything [-fpermissive]
   28 | #define int ll;
      |             ^~
a.cc:45:9: note: in expansion of macro 'int'
   45 |     for(int i=1;i<=N;i++){
      |         ^~~
a.cc:45:21: error: expected ')' before ';' token
   45 |     for(int i=1;i<=N;i++){
      |        ~            ^
      |                     )