随笔分类 - Algorithm
摘要:滑雪Time Limit:1000MSMemory Limit:65536KTotal Submissions:65004Accepted:23795题目链接:http://poj.org/problem?id=1088不理他是不是DP的问题了,最终还是用自己熟悉的DFS解决,但隐约地感觉还是有DP...
阅读全文
摘要:10307 Trees and Numbers1.题意:一个Case表示森林,森林有一棵至多棵树不等,每一棵树代表着一个素数,而森林代表着所有数经过某种结合产生的一个值 N。如果我给这森林加一个根成为一棵树,那么这个根节点表示的就是第N个素数,具体点来说:2 是第一个素数,我们用一个节点表示它,在这...
阅读全文
摘要:做了一阵子的题目了,还不知道什么才能用暴力撸过去,这题不知道是当初我们看见还是真的不懂得用暴力,郁闷,缅怀!DescriptionMaybe, how to remember a lot of passwords is a big problem for someone. Today, Xiaomi...
阅读全文
摘要:The Hamming Distance Problem题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=107&page=show_problem&problem=670今天做的这三...
阅读全文
摘要:Problem CGenerating Fast, Sorted PermutationInput:Standard InputOutput:Standard Output题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge...
阅读全文
摘要:ID Codes题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=107&page=show_problem&problem=82初学者用STL明显的就会让大脑迟钝,一个next_pe...
阅读全文
摘要:The Psychic Poker Player题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=67题目输入的每一行就是一个Case,前面五个表示你...
阅读全文
摘要:The Broken PedometerThe Problem题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2146题目的意思我是理解了,后来直接...
阅读全文
摘要:Problem G. Birthday Cake题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=107&page=show_problem&problem=1108尽管以前做题不知不...
阅读全文
摘要:Problem F:Ordering TasksInput:standard input;Output:standard outputTime Limit:1second; Memory Limit:32 MB(The Joint Effort Contest, Problem setter: Ro...
阅读全文
摘要:Problem HMorning WalkTime Limit3 Seconds题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&proble...
阅读全文
摘要:Problem D: The NecklaceMy little sister had a beautiful necklace made of colorful beads. Two successive beads in the necklace shared a common color at...
阅读全文
摘要:时间限制: 1000ms 内存限制: 256MB描述Alice和Bob还有其他几位好朋友在一起玩传话游戏。这个游戏是这样进行的:首先,所有游戏者按顺序站成一排,Alice站第一位,Bob站最后一位。然后,Alice想一句话悄悄告诉第二位游戏者,第二位游戏者又悄悄地告诉第三位,第三位又告诉第四位……以...
阅读全文
摘要:Play on WordsSome of the secret doors contain avery interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because th...
阅读全文
摘要:BicoloringIn 1976 the ``Four Color Map Theorem" was proven with the assistance of a computer. This theorem states that every map can be colored using ...
阅读全文
摘要:Problem D: XYZZYADVENT: /ad�vent/, n.The prototypical computer adventure game, first designed by Will Crowther on the PDP-10 in the mid-1970s as an at...
阅读全文
摘要:Dungeon MasterYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be fil...
阅读全文
摘要:Slash MazeBy filling a rectangle with slashes (/) and backslashes (), you can generate nice little mazes. Here is an example:As you can see, paths in ...
阅读全文
摘要:Knight MovesA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves tha...
阅读全文
摘要:6582 Encode时间限制:753MS 内存限制:1000K 提交次数:48 通过次数:25题型: 编程题 语言: 无限制DescriptionEncoding schemes are often used in situations requiring encryption or inform...
阅读全文