CY_

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2014年5月1日

摘要: //开始DP之旅,先来道简单的Problem Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequen... 阅读全文
posted @ 2014-05-01 11:30 CY_ 阅读(150) 评论(0) 推荐(0) 编辑

摘要: //大数继续,额,要吐了。Problem DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.This problem requires that you write a program to compute the exact 阅读全文
posted @ 2014-05-01 10:31 CY_ 阅读(227) 评论(0) 推荐(0) 编辑

摘要: // 大数继续Problem DescriptionRecall the definition of the Fibonacci numbers:f1 := 1f2 := 2fn := fn-1 + fn-2 (n >= 3)Given two numbers a and b, calculate how many Fibonacci numbers are in the range [a, b].InputThe input contains several test cases. Each test case consists of two non-negative integer 阅读全文
posted @ 2014-05-01 08:53 CY_ 阅读(140) 评论(0) 推荐(0) 编辑