标签:style blog http color os io strong ar
记忆式搜索
#include <iostream>
using namespace std;
int f(int a,int b)
{
if(a<b) return 0;
else if(b==0) return 1;
else if(b<=a) return f(a-1,b)+f(a,b-1) ;
}
int main(int argc, char *argv[])
{
int m,n;
while(cin>>m>>n)
cout<<f(m,n)<<endl;
return 0;
}
标签:style blog http color os io strong ar
原文地址:http://www.cnblogs.com/2014acm/p/3917560.html