原创 acm pku 1018 Communication System的算法改進

Communication System Description We have received an order from Pizoor Communications Inc. for a special communication

原创 acm pku 1125 Stockbroker Grapevine的Dijkstra算法實現

Stockbroker Grapevine Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a

原创 acm pku 1144 ID Codes的算法分析

ID Codes Description It is 2084 and the year of Big Brother has finally arrived, albeit a century late. In order to exe

原创 acm pku 1050 To the Max的動態規劃方法

To the Max Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguo

原创 acm pku 1056 IMMEDIATE DECODABILITY的代碼實現

  IMMEDIATE DECODABILITY Description An encoding of a set of symbols is said to be immediately decodable if no code for

原创 acm pku 1107 W's Cipher的具體實現方法

W's Cipher Description Weird Wally's Wireless Widgets, Inc. manufactures an eclectic assortment of small, wireless, net

原创 acm pku 1118 Lining Up的具體實現方法

Lining Up Description "How am I ever going to solve this problem?" said the pilot. Indeed, the pilot was not facing an

原创 acm pku 1045 Bode Plot的計算過程

Bode Plot Description Consider the AC circuit below. We will assume that the circuit is in steady-state. Thus, the volt

原创 acm pku 1080 Human Gene Functions的動態規劃方法

Human Gene Functions Description It is well known that a human gene can be considered as a sequence, consisting of four

原创 acm pku 1132 Border的具體實現

Border Description You are to write a program that draws a border around a closed path into a bitmap, as displayed in t

原创 acm pku 1068 Parencodings的實現

Parencodings Description Let S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different

原创 acm pku 1142 Smith Numberd的模擬實現方法

Smith Numbers Description While skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh Univer

原创 acm pku 1088 滑雪的簡易搜索方法

滑雪 Description Michael喜歡滑雪百這並不奇怪, 因爲滑雪的確很刺激。可是爲了獲得速度,滑的區域必須向下傾斜,而且當你滑到坡底,你不得不再次走上坡或者等待升降機來載你。Michael想知道載一個區域中最長底滑坡。區域由一

原创 acm pku 1126 Simple Syntax的具體實現

Simply Syntax Description In the land of Hedonia the official language is Hedonian. A Hedonian professor had noticed th

原创 acm pku 1019 Number Sequence的遞歸計算方法

Number Sequence Description A single positive integer i is given. Write a program to find the digit located in the pos