码迷,mamicode.com
首页 >  
搜索关键字:fibonacci again and    ( 2291个结果
数论 : 高精度 --- UVa 10183 : How Many Fibs ?
How many Fibs?DescriptionRecall the definition of the Fibonacci numbers:f1 := 1 f2 := 2 fn := fn-1 + fn-2 (n>=3) Given two numbers a and b, calcul...
分类:其他好文   时间:2014-08-27 20:17:48    阅读次数:208
ZOJ 3802 Easy 2048 Again 状压DP
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5334...
分类:其他好文   时间:2014-08-27 18:49:48    阅读次数:238
Easy 2048 Again(状压dp)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3802题意: 从数列A中, 删除若干个数(可以0个), 是删除后的数列, 进行类似 Flappy 2048 游戏的运算, 使结果最大, 求该最大值。题解: 每个数ai...
分类:其他好文   时间:2014-08-26 21:19:16    阅读次数:234
dp题目列表
10271 - Chopsticks10739 - String to Palindrome10453 - Make Palindrome10401 - Injured Queen Problem825 - Walking on the Safe Side10617 - Again Palindro...
分类:其他好文   时间:2014-08-26 21:10:16    阅读次数:801
ZOJ 3802 Easy 2048 Again(状压dp)
这道题的意思就是:2048游戏变成了只有一行的时候的玩法,可以向左合并。给你一串数字你可以选择一些加入队列,和为每个数的和,加上合并成的数字。 解题思路:如果一个序列可以合并那么它一定是降序的,比如:32,16,8,4否则的话,他是不能合并的此时的和就确定了。比如32, 32, 8,16.后面的16怎么合并都会比8大,所以是16之前的数字不可能继续合并下去。通过分析我们可以知道降序序列最多会有1...
分类:其他好文   时间:2014-08-26 11:47:55    阅读次数:217
zoj-3802-Easy 2048 Again
简单的dp。 dp[i][j]:在第i位置,递减的状态为j,所获得的最大利润。 枚举状态,如果加进来的数x比状态的最小的要大,那么直接状态变为x。 如果x比最小的要小,那么状态为j+x。 如果x等于最小的,那么依次加和,直至最小的比x大。 #include #include #include #include #include #include #include #include us...
分类:其他好文   时间:2014-08-26 11:39:45    阅读次数:219
Fibonacci
#include<iostream> usingnamespacestd; intmain() { intpound,p0,p1,days,result; charans; do { cout<<"Pleaseinputthepoundandthedays:\n"; cin>>pound>>days; intn=days/5; if(0==n||1==n) { result=pound; cout<<"Theresultis"<<..
分类:其他好文   时间:2014-08-26 03:12:26    阅读次数:204
ZOJ3802 Easy 2048 Again (状压DP)
ZOJ Monthly, August 2014 E题ZOJ月赛 2014年8月 E题http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5334Easy 2048 AgainTime Limit: 2 Seconds Memory ...
分类:其他好文   时间:2014-08-25 21:04:24    阅读次数:233
杭电1848 Fibonacci again and again(博弈-打表)
Fibonacci again and again Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5093    Accepted Submission(s): 2127 Problem Description 任何一个...
分类:其他好文   时间:2014-08-24 23:55:23    阅读次数:241
hdu-------(1848)Fibonacci again and again(sg函数版的尼姆博弈)
Fibonacci again and againTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5088Accepted Submission(s...
分类:其他好文   时间:2014-08-23 09:58:00    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!