Some points:

1.) dp[i]+=dp[i-nums[j]] is the correct way.

2.) Test case constraint is too high, try to apply dp, outside the test cases.(find values till 1e5+5)

3.) problem could be solved without dp, if you write it on a sheet of paper(there is some sort of pattern)

Hereโs my dp approach(itโs in C++):

```
#include <bits/stdc++.h>
using namespace std;
int main() {
int teams[3]={1,2,4};
long long dp[100005]={0};//intialise dp here
dp[0]=1; //for 0 it's 1 way
for(int i=0;i<3;i++)
for(int j=teams[i];j<=100005;j++) //precomp values
dp[j]+=dp[j-teams[i]]; //correct way
int t;cin>>t;while(t--){ //test cases
int n,bot;cin>>n>>bot;
int val=n-bot; //real players
cout<<dp[val]<<"\n"; //sol
}
return 0;
}
```