FB - DP + Bignum

29/03/2023

Code chưa xử lí bignum ;-;

For sure là ăn dc 5/15 tests :3

Code
#include <bits/stdc++.h>
using namespace std;

//string plus(string a, string b) {
//	
//}

int main(){
	int n;
	cin >> n;
	unsigned long long dp[n+1][n+1];
	for (int i=1;i<= n;i++) {
		dp[1][i] = 1;
		dp[i][1] = 1;
	}
	for (int i=2;i<= n;i++) {
		for (int j=2;j<= n;j++) {
//			dp[i][j] = plus(dp[i-1][j], dp[i][j-1]);
			dp[i][j] = dp[i-1][j] + dp[i][j-1];
		}
	}
	cout << dp[n][n];
	
	return 0;
}