**This is my code for GRUMPMA. Can someone tell me why is it wrong?**

```
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
int t;
cin>>t;
ll NUM=1000000007;
while(t--){
ll n,k,m;
cin>>n>>k>>m;
ll b[k+1]={0};
b[0]=1;
for(int i=0; i<n; i++){
ll temp;
cin>>temp;
temp=temp%m;
int j=0;
while(j*m+temp<=k){
b[0]=1;
b[(j*m+temp)]=(b[(j*m+temp)]%NUM+b[(j*m+temp)-1]%NUM)%NUM;
j++;
}
}
cout<<b[k]<<'\n';
}
return 0;
}
```