码迷,mamicode.com
首页 >  
搜索关键字:poj 3254    ( 20310个结果
poj 1079 Calendar Game(博弈论 SG)
poj 1079 Calendar Game(博弈论 SG)...
分类:其他好文   时间:2014-06-22 21:52:49    阅读次数:162
Mark一下, dp状态转移方程写对,但是写代码都错,poj 1651 poj 1179
dp题: 1、写状态转移方程; 2、考虑初始化边界,有意义的赋定值,还没计算的赋边界值; 3、怎么写代码自底向上计算最优值 今天做了几个基础dp,全部是dp方程写对但是初始化以及计算写错 先是poj 1651 其实就是个赤裸裸的矩阵连乘,dp方程很容易写出                       dp[i][j]=min(dp[i][k]+dp[k+1][j]+r[i]*c[k]*...
分类:其他好文   时间:2014-06-22 19:29:41    阅读次数:157
POJ -1573 Robot Motion
题目链接:POJ 1573 Robot Motion 一个小模拟,很简单,按照提示一步步走就是了 #include #include #include #include #include using namespace std; int n = 0,m = 0,st = 0; int map[10][20],dis[10][20];;...
分类:其他好文   时间:2014-06-22 18:14:23    阅读次数:182
POJ 3252 Round Numbers 数学题解
Description The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other names) i...
分类:其他好文   时间:2014-06-22 17:15:11    阅读次数:275
POJ 1995 Raising Modulo Numbers (数论-整数快速幂)
题目大意: T组测试数据,求(A1B1+A2B2+ ... +AHBH)mod M. 解题思路: 对于普通暴力算法一定是 A1*A1*A1.....*A1 乘以 B1次, A2*A2...........*A2 乘以 B2次, ...................................... 然后全部相加起来,这样效率很低,肯定是超时了 那么有什么办法解决这一问题,可以用快速幂, 如果 A1^2有了,那么 A1^4就可以得到,A1^8也可以得到,...... ,立刻由n降到了lgn 可以...
分类:其他好文   时间:2014-06-22 16:17:10    阅读次数:178
poj 1007 Quoit Design(分治)
poj 1007 Quoit Design(分治)...
分类:其他好文   时间:2014-06-22 15:56:34    阅读次数:137
POJ训练计划2299_Ultra-QuickSort(归并排序求逆序数)
Ultra-QuickSort Time Limit: 7000MS   Memory Limit: 65536K Total Submissions: 39279   Accepted: 14163 Description In this problem, you have to analyze a particular sorting...
分类:其他好文   时间:2014-06-22 15:38:06    阅读次数:168
POJ-1068 Parencodings
Description Let S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways:  q By an integer sequence P = p1 p2...pn where pi is the number of left parentheses...
分类:其他好文   时间:2014-06-22 14:06:49    阅读次数:249
poj-2996 Help Me with the Game
Help Me with the Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3210   Accepted: 2071 Description Your task is to read a picture of a chessboard position...
分类:其他好文   时间:2014-06-22 00:22:45    阅读次数:382
POJ 1952 BUY LOW, BUY LOWER
BUY LOW, BUY LOWER Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 8311   Accepted: 2883 Description The advice to "buy low" is half the formula to success i...
分类:其他好文   时间:2014-06-21 20:49:18    阅读次数:304
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!