hdu 1708 Fibonacci String】的更多相关文章

Fibonacci String Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5012 Accepted Submission(s): 1693 Problem Description After little Jim learned Fibonacci Number in the class , he was very interest…
Problem Description After little Jim learned Fibonacci Number in the class , he was very interest in it. Now he is thinking about a new thing – Fibonacci String . He defines : str[n] = str[n-1] + str[n-2] ( n > 1 ) He is so crazying that if someone g…
Fibonacci String Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4568    Accepted Submission(s): 1540 Problem Description After little Jim learned Fibonacci Number in the class , he was very int…
Fibonacci String Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5008    Accepted Submission(s): 1690 Problem Description After little Jim learned Fibonacci Number in the class , he was very int…
HDU 3117 Fibonacci Numbers(斐波那契前后四位,打表+取对+矩阵高速幂) ACM 题目地址:HDU 3117 Fibonacci Numbers 题意:  求第n个斐波那契数的前四位和后四位.  不足8位直接输出. 分析:  前四位有另外一题HDU 1568,用取对的方法来做的.  后四位能够用矩阵高速幂,MOD设成10000即可了. 代码: /* * Author: illuz <iilluzen[at]gmail.com> * Blog: http://blog.c…
HDU 4054 Number String 思路: 状态:dp[i][j]表示以j结尾i的排列 状态转移: 如果s[i - 1]是' I ',那么dp[i][j] = dp[i-1][j-1] + dp[i-1][j-2] + .. + dp[i-1][1] 如果s[i - 1]是‘D’,那么dp[i][j] = dp[i-1][j] + dp[i-1][j+1] + ... + dp[i-1][i] 用前缀和处理出sum[i][j]就不用dp[i][j]了 代码: #include<bits…
斐波那契数列后四位可以用快速幂取模(模10000)算出.前四位要用公式推 HDU 3117 Fibonacci Numbers(矩阵快速幂+公式) f(n)=(((1+√5)/2)^n+((1-√5)/2)^n)/√5 假设F[n]可以表示成 t * 10^k(t是一个小数),那么对于F[n]取对数log10,答案就为log10 t + K,此时很明显log10 t<1,于是我们去除整数部分,就得到了log10 t 再用pow(10,log10 t)我们就还原回了t.将t×1000就得到了F[n…
http://acm.hdu.edu.cn/showproblem.php?pid=4786 Fibonacci Tree Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 49    Accepted Submission(s): 26 Problem Description Coach Pang is interested in Fi…
http://acm.hdu.edu.cn/showproblem.php?pid=1021 Fibonacci Again Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 29201    Accepted Submission(s): 14148 Problem Description There are another kind…
http://acm.hdu.edu.cn/showproblem.php? pid=4786 Fibonacci Tree Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1733    Accepted Submission(s): 543 Problem Description Coach Pang is interested i…