
ACM
SHAOIT
这个作者很懒,什么都没留下…
展开
-
Number Sequence
Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n). Input原创 2014-04-22 14:38:53 · 6056 阅读 · 1 评论 -
hdu-acm
Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 +原创 2014-04-23 15:38:31 · 852 阅读 · 0 评论