Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define forit(it, s) for(__typeof(s.begin()) it = s.begin(); it != s.end(); it++)
- #define np(v) next_permutation(v.begin(), v.end())
- #define pll pair < long long, long long>
- #define all(a) a.begin(), a.end()
- #define ull unsigned long long
- #define pii pair < ll, ll >
- #define sz(a) (int)a.size()
- #define sqr(x) ((x) * (x))
- #define y1 stupid_cmath
- #define vi vector <int>
- #define pb push_back
- #define mp make_pair
- #define ll long long
- #define endl "\n"
- #define s second
- #define f first
- #define tm asdasd
- const int inf = (int)1e9;
- const int mod = (int)1e9 + 7;
- const int N = (1 << 20) + 1;
- const double eps = 1e-9;
- const double pi = acos(-1.0);
- ull n, a, b, dp[111][111];
- ull calc(int n, int k){
- if(k == 0 || k == n) return 1;
- ull &res = dp[n][k];
- if(res != -1) return res;
- return res = calc(n - 1, k) + calc(n - 1, k - 1);
- }
- int main(){
- ios_base::sync_with_stdio(0), cin.tie(0);
- cin >> n >> a >> b;
- memset(dp, -1, sizeof dp);
- ull x = calc(n + a, a);
- ull y = calc(n + b, b);
- cout << x * y << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement