Задачи
Умная черепашка
Дайте решение пж 1704
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]; }