Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:本题是很简单的递推

Posted by zhangxingh2011 at 2011-05-30 20:51:56 on Problem 1664
In Reply To:本题是很简单的递推 Posted by:libojie at 2009-02-20 00:09:06
> 本题是很简单的递推。
> ①最少的盘子放了一个,这样每个盘子至少一个,n个盘子先放上n个,剩下的m-n个可以随便放
> ②最少的盘子没有放,这样剩下的n-1个盘子还是随便放m个
> int f(int m,int n)
> { if(m<0)
>    return 0;
>   if(m==0||n==1)
>    return 1;
>   return f(m-n,n)+f(m,n-1);
> }

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator