# 总结

## dp版本

#include<bits/stdc++.h>
//typedef long long ll;
//#define ull       unsigned long long
#define int       long long
#define F           first
#define S           second
#define endl        "\n"//<<flush
#define lowbit(x)   (x&(-x))
#define ferma(a,b)  pow(a,b-2)
#define pb          push_back
#define mp          make_pair
#define all(x)      x.begin(),x.end()
#define memset(a,b) memset(a,b,sizeof(a));
#define IOS         ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
using namespace std;
const double PI=acos(-1.0);
const int inf=0x3f3f3f3f;
const int MAXN=0x7fffffff;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
void file()
{
#ifdef ONLINE_JUDGE
#else
freopen("cin.txt","r",stdin);
//  freopen("cout.txt","w",stdout);
#endif
}
const int N=1e3+5;
const int mod=1e9+7;
int C[N][N];
signed main()
{
IOS;
//file();
for(int i=1;i<=1000;i++)
{
for(int j=1;j<=10;j++)
{
if(i==1)
C[i][j]=1;
else if(j==1)
C[i][j]=i;
else
C[i][j]=(C[i-1][j]+C[i][j-1])%mod;
}
}
int n,m;
cin>>n>>m;
int ans=0;
for(int i=1;i<=n;i++)
ans=(ans+(C[i][m]-C[i-1][m]+mod)%mod*C[n+1-i][m])%mod;
cout<<ans<<endl;
return 0;
}



©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客