标签:stream dba return name closed iostream ++ nod opened
1 #include <iostream> 2 using namespace std; 3 long long dp[1001][1001]; 4 const long long mod=1e9+7; 5 int main() 6 { 7 int n,m; 8 cin>>n>>m; 9 for(int i=1;i<=n;i++) dp[i][1]=1; 10 for(int j=1;j<=m;j++) dp[1][j]=1; 11 for(int i=2;i<=n;i++){ 12 for(int j=2;j<=m;j++){ 13 dp[i][j]=(dp[i-1][j]+dp[i][j-1])%mod; 14 } 15 } 16 cout<<dp[n][m]<<endl; 17 return 0; 18 }
标签:stream dba return name closed iostream ++ nod opened
原文地址:https://www.cnblogs.com/fjqfjq/p/9021662.html