标签:
算法训练 未名湖边的烦恼
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int f(int m,int n) { if(m<n) return 0; if(n==0) return 1; return f(m-1,n)+f(m,n-1); } int main() { int m,n; while(scanf("%d%d",&m,&n)!=EOF) { int s; s=f(m,n); printf("%d\n",s); } return 0; }
标签:
原文地址:http://www.cnblogs.com/hsd-/p/5180659.html