PAT递推求解.ppt

PAT递推求解.ppt

PAT培训教程 杭州电子科技大学 刘春英 acm@hdu.edu.cn 第二讲 递推求解 Start From Fibonacci The series begins with 0 and 1. After that, use the simple rule: Add the last two numbers to get the next. Story about Fibonacci 关键词: 1225; Pisa; Fibonacci Frederick II; Math Competition. January February March April May、June… ??? The number series is—— 0、1、1、2、3、5… Fibonacci Golden Section 简单思考题: 在一个平面上有一个圆和n条直线,这些直线中每一条在圆内同其他直线相交,假设没有3条直线相交于一点,试问这些直线将圆分成多少区域。 是不是这个—— F(1)=2; F(n) = F(n-1)+n; 太简单了? 例:(2050)折线分割平面 问题描述: 平面上有n条折线,问这些折线最多能将平面分割成多少块? 样例输入 1 2 样例输出 2 7 思考:如何用递推解决? 另外一种结论: Zn = 2n ( 2n + 1 ) / 2 + 1 -

文档评论(0)

1亿VIP精品文档

相关文档