原创 PKU-1011 Sticks (DFS + 剪枝)
原題鏈接 http://poj.org/problem?id=1011 Sticks Description George took sticks of the same length and cut them randomly unt
原创 PKU-1001 Exponentiation(浮點數相乘)
原題鏈接 http://poj.org/problem?id=1001 Exponentiation Description Problems involving the computation of exact values of v
原创 最小生成樹(Prim和Kruskal)
原文鏈接 http://blog.csdn.net/pbj1203/article/details/6213954 最小生成樹 給定一個帶權的無向連通圖,如何選取一棵生成樹,使樹上所有邊上權的總和爲最小,這叫最小生成樹. 求最小生成樹的算
原创 PKU-1080 Human Gene Functions
原題鏈接 http://poj.org/problem?id=1080 Human Gene Functions Description It is well known that a human gene can be cons
原创 PKU-1088 滑雪(記憶化搜索)
原題鏈接 http://poj.org/problem?id=1088 滑雪 Description Michael喜歡滑雪百這並不奇怪, 因爲滑雪的確很刺激。可是爲了獲得速度,滑的區域必須向下傾斜,而且當你滑到坡底,你不得不再次走上坡
原创 HDU-1003 Max Sum(最大連續子段和)
原題鏈接 http://acm.hdu.edu.cn/showproblem.php?pid=1003 Max Sum Problem Description Given a sequence a[1],a[2],a[3]......a
原创 PKU-1012 Joseph (約瑟夫環)
原題鏈接 http://poj.org/problem?id=1012 Joseph Description The Joseph's problem is notoriously known. For those who are no
原创 動態規劃和記憶化搜索
原文鏈接 http://blog.csdn.net/urecvbnkuhbh_54245df/article/details/5847876 動態規劃和記憶化搜索: 動態規劃:就是一個最優化問題,先將問題分解爲子問題,並且對於這些分解的子
原创 PKU-1050 To the Max (最大子矩陣和)
原題鏈接 http://poj.org/problem?id=1050 To the Max Description Given a two-dimensional array of positive and negative inte
原创 PKU-1159 Palindrome (最長公共子序列LCS)
原題鏈接 http://poj.org/problem?id=1159 Palindrome Description A palindrome is a symmetrical string, that is, a string rea
原创 (最小生成樹-Prim)PKU-1258 Agri-Net
原題鏈接 http://poj.org/problem?id=1258 Agri-Net Description Farmer John has been elected mayor of his town! One of his ca
原创 PKU-1163 The Triangle
原題鏈接 http://poj.org/problem?id=1163 The Triangle Description 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Fig
原创 (最短路-floyd+鄰接矩陣)PKU-1125 Stockbroker Grapevine
原題鏈接 http://poj.org/problem?id=1125 Stockbroker Grapevine Description Stockbrokers are known to overreact to rumours
原创 最短路徑算法
原文鏈接 http://dongzi85.blog.163.com/blog/static/8079890520089288468222/ 最短路徑算法 分類: 無迴路網絡:拓撲排序法無負權網絡:Dijkstra算法,Bellman-Fo
原创 博弈---取石子游戲
取石子問題 有一種很有意思的遊戲,就是有物體若干堆,可以是火柴棍或是圍棋子等等均可。兩個人輪流從堆中取物體若干,規定最後取光物體者取勝。這是我國民間很古老的一個遊戲,別看這遊戲極其簡單,卻蘊含着深刻的數學原理。下面我們來分析一下要如何