Language: C++

#include <bits/stdc++.h>

using namespace std;
#define int long long;
const int mod=1e9+7;
#define rep(i,n) for(int i=0;i<n;++i)
int n,m,a[514],dp[501][1001];
int main()
{
	 cin>>n>>m;
	 rep(i,n)cin>>a[i];
	dp[0][0]=1;
    rep(i,n){
		for(int j=0;j<=m;++j){
			dp[i+1][j]=dp[i][j];
			dp[i+1][j]%=mod;
			dp[i+1][min(j+a[i],min)]+=dp[i][j];
			dp[i+1][min(j+a[i],min)]%=mod;
		}
	}
	cout<<dp[n][m]<<endl;
}


Compiler output:
a.cc:4:18: error: declaration does not declare anything [-fpermissive]
    4 | #define int long long;
      |                  ^~~~
a.cc:5:7: note: in expansion of macro 'int'
    5 | const int mod=1e9+7;
      |       ^~~
a.cc:5:11: error: 'mod' does not name a type
    5 | const int mod=1e9+7;
      |           ^~~
a.cc:4:18: error: declaration does not declare anything [-fpermissive]
    4 | #define int long long;
      |                  ^~~~
a.cc:7:1: note: in expansion of macro 'int'
    7 | int n,m,a[514],dp[501][1001];
      | ^~~
a.cc:7:5: error: 'n' does not name a type
    7 | int n,m,a[514],dp[501][1001];
      |     ^
a.cc:4:18: error: declaration does not declare anything [-fpermissive]
    4 | #define int long long;
      |                  ^~~~
a.cc:8:1: note: in expansion of macro 'int'
    8 | int main()
      | ^~~
a.cc:8:5: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:10:15: error: 'n' was not declared in this scope; did you mean 'yn'?
   10 |          cin>>n>>m;
      |               ^
      |               yn
a.cc:10:18: error: 'm' was not declared in this scope; did you mean 'tm'?
   10 |          cin>>n>>m;
      |                  ^
      |                  tm
a.cc:4:18: error: declaration does not declare anything [-fpermissive]
    4 | #define int long long;
      |                  ^~~~
a.cc:6:22: note: in expansion of macro 'int'
    6 | #define rep(i,n) for(int i=0;i<n;++i)
      |                      ^~~
a.cc:11:10: note: in expansion of macro 'rep'
   11 |          rep(i,n)cin>>a[i];
      |          ^~~
a.cc:11:14: error: 'i' was not declared in this scope
   11 |          rep(i,n)cin>>a[i];
      |              ^
a.cc:6:26: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i=0;i<n;++i)
      |                          ^
a.cc:6:33: error: expected ')' before ';' token
    6 | #define rep(i,n) for(int i=0;i<n;++i)
      |                     ~           ^
a.cc:11:10: note: in expansion of macro 'rep'
   11 |          rep(i,n)cin>>a[i];
      |          ^~~
a.cc:11:14: error: 'i' was not declared in this scope
   11 |          rep(i,n)cin>>a[i];
      |              ^
a.cc:6:36: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i=0;i<n;++i)
      |                                    ^
a.cc:12:9: error: 'dp' was not declared in this scope; did you mean 'dup'?
   12 |         dp[0][0]=1;
      |         ^~
      |         dup
a.cc:4:18: error: declaration does not declare anything [-fpermissive]
    4 | #define int long long;
      |                  ^~~~
a.cc:6:22: note: in expansion of macro 'int'
    6 | #define rep(i,n) for(int i=0;i<n;++i)
      |                      ^~~
a.cc:13:5: note: in expansion of macro 'rep'
   13 |     rep(i,n){
      |     ^~~
a.cc:6:33: error: expected ')' before ';' token
    6 | #define rep(i,n) for(int i=0;i<n;++i)
      |                     ~           ^
a.cc:13:5: note: in expansion of macro 'rep'
   13 |     rep(i,n){
      |     ^~~