Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- long PART(int m, int n){
- if (n == 0) return 0;
- if (m == 0) return 1;
- if (m < n) return PART(m, m);
- return PART(m, n - 1) + PART(m - n, n);
- }
- int main(){
- cout << PART(5,3) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment