
acm
文章平均质量分 84
uestcshe
要用数学的思维去写代码,杠杠的
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
acm pku 1142 Smith Numberd的模拟实现方法
一道题意明确的模拟题。原创 2010-07-01 20:46:00 · 1041 阅读 · 0 评论 -
acm pku 1258 Agri-Net的Prim算法实现
应用Prim算法产生最小生成树的问题。原创 2010-12-05 12:42:00 · 844 阅读 · 0 评论 -
acm pku 1260 Pearls的动态规划算法实现
这是一道动态规划的题目,需要以“搜索”的方式来寻找问题的最优解原创 2010-12-05 16:09:00 · 864 阅读 · 0 评论 -
acm pku 1298 The hardest problem ever的实现
非常简单的一道编码解码题目,仅仅是对字符串中的大写字母做简单的循环移位原创 2010-12-09 23:54:00 · 767 阅读 · 0 评论 -
acm pku 1230Pass-Muraille的贪婪算法实现
贪婪算法的典型题目,在解决这个问题是,在考察某列时,去掉处对之后的影响较大的墙壁,即可得到结果原创 2010-12-12 23:43:00 · 714 阅读 · 0 评论 -
acm pku 1287 Networking的Prim最小生成树算法实现
本质上,这是一道最小生成树的问题,只是在输入节点间路径时,需要构造节点间唯一的最小路径。原创 2010-12-16 08:02:00 · 952 阅读 · 0 评论 -
acm pku 1299 Polar Exploer的简单实现
一道简单易实现的计算题目,唯一需要注意的是,真实的行进角度应该小于等于180度。原创 2010-12-18 14:32:00 · 976 阅读 · 0 评论 -
acm pku 1243 One person的逻辑推理
这道题目可以被认为是一道组合数学题目,也是一道逻辑推理题,理解了题目的意图后,则可轻松解题原创 2011-01-02 00:07:00 · 1001 阅读 · 0 评论 -
acm pku 1207 The 3n+1的算法分析与实现
这是一道简单的模拟题目,需要注意两点,避免每次都重新根据输入搜索结果,可进行预处理;要注意输入i和j时,并不意味着i一定小于j原创 2010-11-13 23:07:00 · 1062 阅读 · 0 评论 -
acm pku 1218 The drunk jailer的算法分析与实现
又一道简单模拟题,只需要模拟狱卒对每个房间的操作次数即可:若对某房间的操作次数为奇数次,则该房间的囚房可以成功逃走原创 2010-11-13 23:35:00 · 757 阅读 · 0 评论 -
acm pku 1222 Extended lights out的算法分析
通过搜索“开关”第一行所有灯的不同状态来判断可行解的状态,是一道典型的模拟题目原创 2010-11-14 21:29:00 · 1035 阅读 · 0 评论 -
acm pku 1226 Substring的算法分析与实现
暴力搜索所有字符串的共有子串原创 2010-11-19 00:08:00 · 904 阅读 · 0 评论 -
acm pku 1221 Unimodal palindromic decompositions的逻辑推理过程
如果能够弄清楚这道题目的逻辑过程,则是一道简单的递推题目。原创 2010-11-19 21:54:00 · 765 阅读 · 0 评论 -
acm pku 1247 Magnificent Meatballs的算法实现
给点数组(数据元素具有不同权重),求数组的一种划分,使得数组左右具有相同的总权重原创 2010-11-25 23:04:00 · 741 阅读 · 0 评论 -
acm pku 1126 Simple Syntax的具体实现
Simply SyntaxDescriptionIn the land of Hedonia the official language is Hedonian. A Hedonian professor had noticed that many of her students still did not master the syntax of Hedonian well. Tired原创 2010-05-30 12:26:00 · 744 阅读 · 0 评论 -
acm pku 1125 Stockbroker Grapevine的Dijkstra算法实现
Stockbroker GrapevineDescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your emplo原创 2010-05-29 15:12:00 · 788 阅读 · 0 评论 -
acm pku 1144 ID Codes的算法分析
这到题目可以理解为: 对包含特定字符的字符串, 求包含这些字符,且别给定字符串大的最小字符串.原创 2010-07-01 22:13:00 · 833 阅读 · 0 评论 -
acm pku 1018 Communication System的算法改进
Communication SystemDescriptionWe have received an order from Pizoor Communications Inc. for a special communication system. The system consists of several devices. For each device, we are free to原创 2010-05-24 22:57:00 · 936 阅读 · 0 评论 -
acm pku 1045 Bode Plot的计算过程
Bode PlotDescriptionConsider the AC circuit below. We will assume that the circuit is in steady-state. Thus, the voltage at nodes 1 and 2 are given by v1 = VS coswt and v2 = VRcos (wt + q ) where原创 2010-05-24 23:03:00 · 1957 阅读 · 2 评论 -
acm pku 1068 Parencodings的实现
ParencodingsDescriptionLet 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 pa原创 2010-05-24 23:19:00 · 933 阅读 · 0 评论 -
acm pku 1080 Human Gene Functions的动态规划方法
Human Gene FunctionsDescriptionIt is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T. Biologi原创 2010-05-24 23:26:00 · 745 阅读 · 0 评论 -
acm pku 1050 To the Max的动态规划方法
To the MaxDescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of原创 2010-05-26 19:13:00 · 700 阅读 · 0 评论 -
acm pku 1056 IMMEDIATE DECODABILITY的代码实现
IMMEDIATE DECODABILITYDescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for thi原创 2010-05-26 07:25:00 · 700 阅读 · 0 评论 -
acm pku 1088 滑雪的简易搜索方法
滑雪DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7原创 2010-05-26 22:29:00 · 1430 阅读 · 0 评论 -
acm pku 1019 Number Sequence的递归计算方法
Number SequenceDescriptionA single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2...Sk. Each group Sk consists of原创 2010-05-25 21:21:00 · 849 阅读 · 0 评论 -
acm pku 1107 W's Cipher的具体实现方法
Ws CipherDescriptionWeird Wallys Wireless Widgets, Inc. manufactures an eclectic assortment of small, wireless, network capable devices, ranging from dog collars, to pencils, to fishing bobbers.原创 2010-05-29 10:45:00 · 659 阅读 · 0 评论 -
acm pku 1118 Lining Up的具体实现方法
Lining UpDescription"How am I ever going to solve this problem?" said the pilot. Indeed, the pilot was not facing an easy task. She had to drop packages at specific points scattered in a dangerous原创 2010-05-29 13:14:00 · 1158 阅读 · 0 评论 -
acm pku 1132 Border的具体实现
BorderDescriptionYou are to write a program that draws a border around a closed path into a bitmap, as displayed in the following figure: The path is closed and runs along the grid lines, i.e原创 2010-05-29 18:40:00 · 1246 阅读 · 0 评论 -
acm pku 1183 反正切函数的应用
因式分解问题原创 2010-07-25 23:15:00 · 804 阅读 · 1 评论 -
acm pku 1251 Jungle Roads的算法分析与实现
这就是最小生成树问题,可选解决方案很多,本方法只是其中较为常见的一种原创 2010-11-26 23:01:00 · 778 阅读 · 0 评论