Back
PhanTich.cpp
Save
// PhanTich.cpp #include
using namespace std; int a[100][100]; int PhanTich(int m, int n) { if (m == 0) { if (n == 0) a[m][n] = 1; else a[m][n] = 0; } else { if (m > n) a[m][n] = PhanTich(m - 1, n); else a[m][n] = PhanTich(m - 1, n) + PhanTich(m, n - m); } return a[m][n]; } int main() { cout << PhanTich(5, 5); return 0; }