eolymp
bolt
Try our new interface for solving problems
Problems

Clever turtle

published at 3/5/19, 1:50:40 pm

Дайте решение пж 1704

published at 1/13/24, 12:32:51 pm

include<bits/stdc++.h>

using ll=long long; using namespace std; ll dp[1001][1001]; int main(){ ll n,m; cin>>n>>m; dp[1][1]=1; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ dp[i][j]+=dp[i][j-1]+dp[i-1][j]; } } cout<<dp[n][m]; }