poj 3132】的更多相关文章

题目链接: POJ:id=3132">http://poj.org/problem?id=3132 ZOJ:http://acm.zju.edu.cn/onlinejudge/showProblem.do? problemCode=2822 Description A positive integer may be expressed as a sum of different prime numbers (primes), in one way or another. Given two…
Sum of Different Primes Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 3360   Accepted: 2092 Description A positive integer may be expressed as a sum of different prime numbers (primes), in one way or another. Given two positive integer…
Sum of Different Primes Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 3684   Accepted: 2252 Description A positive integer may be expressed as a sum of different prime numbers (primes), in one way or another. Given two positive integer…
动态规划与贪心相关: {HDU}{4739}{Zhuge Liang's Mines}{压缩DP} 题意:给定20个点坐标,求最多有多少个不相交(点也不相交)的正方形 思路:背包问题,求出所有的正方形,然后求最多有多少个正方形不互相覆盖,这题真是神思路. {POJ}{3846}{Mountain Road} 题意:给定两个地点车的班次,路是双向单车道,求安排最短的时间 思路:对车次序列进行二维DP转移,转移的时候需要注意时刻的维护.这个题目的DP思路是正向DP,每次遍历到f[i][j]都需要更新…
更新中... http://poj.org/problem?id=1037 dp[i][j][0]表示序列长度为i,以j开始并且前两位下降的合法序列数目; dp[i][j][1]表示序列长度为i, 以j开始并且前两位上升的合法序列数目; 于是我们可以得到递推方程式:dp[i][j][0] += dp[i-1][k][1] ( 1 <= k < j ), dp[i][j][1] += dp[i-1][k][0] ( k <= j <= i), 然后我们就可以从第一位开始枚举了. ht…
链接: http://poj.org/problem?id=1694 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=27454#problem/E An Old Stone Game Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3132   Accepted: 1422 Description There is an old stone game, play…
Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798   Special Judge Description Every year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets…
Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   Special Judge Description The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000…
The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286   Accepted: 8603   Special Judge Description The game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a…
Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Description Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the…