Fork me on GitHub

04 2013 档案

摘要:Graph Coloring找到理想的最多的黑点排布的情况,其中黑点不能相邻,而白点可以相邻,想清楚了就知道直接放黑点就行了,遇到不能放的地方不要放,可以放的地方选择放与不放,随时更新并保存理想的情况题目链接:http://uva.onlinejudge.org/index.php?option=c... 阅读全文
posted @ 2013-04-29 13:00 Gifur 阅读(276) 评论(0) 推荐(0) 编辑
摘要:Bandwidth给你一个以邻接表展现的图的节点以及其相邻的节点,这时你将所有出现过的节点随机排列,找出此排序中相邻节点之间距离最长的值代表此排列的值,而这只是其中一种排列,你要找出所有排列中这种代表的值得最小值,并将有最小值的串的排列情况输出题目链接:http://uva.onlinejudge.... 阅读全文
posted @ 2013-04-28 22:14 Gifur 阅读(363) 评论(0) 推荐(0) 编辑
摘要:The Sultan's Successors完全赤裸裸地八皇后问题,找出所有的八皇后放置的情况,然后比较每种情况得到的权重,找出最大的那个来,上星期看了刘汝佳竞赛入门书的思路,现在按照那种思路来写,推出斜线的规律,写完后不用调试就一次性过了,可以看出真的是不学就无知如果不知道《算法竞赛入门经典》的... 阅读全文
posted @ 2013-04-28 15:56 Gifur 阅读(730) 评论(0) 推荐(0) 编辑
摘要:How Big Is It?题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=953题目要求你求一个足以容纳所有给你不同半径的... 阅读全文
posted @ 2013-04-27 14:38 Gifur 阅读(431) 评论(0) 推荐(0) 编辑
摘要:Mapping the Swaps这题开始就引申题目的意思了,这种排序是通过多次交换不同的相邻的两个值而达到排序的目的,他要你计算的是在得到最少的交换次序达到排序的前提下,问只能是最少交换次序的排序情况有多少种,刚开始理解错了,第一次错误的理解为最小的交换次序是多少?第二次错误地理解为无特殊重复(当... 阅读全文
posted @ 2013-04-27 01:10 Gifur 阅读(352) 评论(0) 推荐(0) 编辑
摘要:Problem I 23 Out of 5Input:standard inputOutput:standard outputTime Limit:1 secondMemory Limit:32 MB这几天做的都是水题,这题也不例外,其实也不要说是水题,如果排列不是靠next_perminatio... 阅读全文
posted @ 2013-04-26 22:10 Gifur 阅读(253) 评论(0) 推荐(0) 编辑
摘要:Transportation题目的意思是说列车从起始点开出的时候,他要收集每个站(包括起始站)的乘客的搭车订单,这些订单能够知道多少人从哪个站上车然后从哪个站下车。但由于列车载人的容量有限,它必须有所规划,即放弃有些站的订单票,在这样的情况下,求这列车能够得到的最大的利润值,单价是人从上车开始每经过... 阅读全文
posted @ 2013-04-25 19:17 Gifur 阅读(603) 评论(0) 推荐(0) 编辑
摘要:The Settlers of Catan简单题,感觉回溯的最大的一个特点就是在其中一次递归的过程中修改变量后要恢复原状,而且过程跟DFs类似,思路明白了就好做了,这题也一样,题目说找一条最长的路,每两个节点的路径只能走一次,节点可以走多次,我是将将有路径的节点标记好,走过后将这条路径删掉,然后遍历... 阅读全文
posted @ 2013-04-24 13:07 Gifur 阅读(392) 评论(0) 推荐(0) 编辑
摘要:Don't Get Rooked题目的内容只是在四皇后的基础之上加上了点障碍,处理的方式还是一样,如果是四皇后的问题的话,那么可以一行一行的放置,现在的问题可以一行放两个(在中间被墙阻挡的时候)这时就要将一行分开遍历,将墙的两边看做是不同的行处理题目链接:http://uva.onlinejudge... 阅读全文
posted @ 2013-04-23 23:40 Gifur 阅读(336) 评论(0) 推荐(0) 编辑
摘要:Getting in Line题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=108&page=show_problem&problem=152题目比较典型,给你n个点的坐标,找出一... 阅读全文
posted @ 2013-04-23 17:15 Gifur 阅读(211) 评论(0) 推荐(0) 编辑
摘要:初级入门DP,感觉有点难招架,已经看了MIT算法导论就关于DP的视频有两遍了,逛逛飞燕社区也找了一下相关的资料,今早愣在机房尽想着写状态转移方程,最后还是只写了那么一条:dp[i, j] = a[i] == b[i] ? dp[i-1][j-1]+1 : 0; 串的长度达到了10^5,目测开到二维应... 阅读全文
posted @ 2013-04-19 23:05 Gifur 阅读(922) 评论(0) 推荐(0) 编辑
摘要:滑雪Time Limit:1000MSMemory Limit:65536KTotal Submissions:65004Accepted:23795题目链接:http://poj.org/problem?id=1088不理他是不是DP的问题了,最终还是用自己熟悉的DFS解决,但隐约地感觉还是有DP... 阅读全文
posted @ 2013-04-18 18:41 Gifur 阅读(164) 评论(0) 推荐(0) 编辑
摘要:10307 Trees and Numbers1.题意:一个Case表示森林,森林有一棵至多棵树不等,每一棵树代表着一个素数,而森林代表着所有数经过某种结合产生的一个值 N。如果我给这森林加一个根成为一棵树,那么这个根节点表示的就是第N个素数,具体点来说:2 是第一个素数,我们用一个节点表示它,在这... 阅读全文
posted @ 2013-04-17 20:48 Gifur 阅读(327) 评论(0) 推荐(0) 编辑
摘要:做了一阵子的题目了,还不知道什么才能用暴力撸过去,这题不知道是当初我们看见还是真的不懂得用暴力,郁闷,缅怀!DescriptionMaybe, how to remember a lot of passwords is a big problem for someone. Today, Xiaomi... 阅读全文
posted @ 2013-04-17 07:24 Gifur 阅读(290) 评论(0) 推荐(0) 编辑
摘要:The Hamming Distance Problem题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=107&page=show_problem&problem=670今天做的这三... 阅读全文
posted @ 2013-04-16 13:59 Gifur 阅读(273) 评论(0) 推荐(0) 编辑
摘要:Problem CGenerating Fast, Sorted PermutationInput:Standard InputOutput:Standard Output题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge... 阅读全文
posted @ 2013-04-16 07:11 Gifur 阅读(165) 评论(0) 推荐(0) 编辑
摘要:ID Codes题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=107&page=show_problem&problem=82初学者用STL明显的就会让大脑迟钝,一个next_pe... 阅读全文
posted @ 2013-04-16 06:40 Gifur 阅读(208) 评论(0) 推荐(0) 编辑
摘要:The Psychic Poker Player题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=67题目输入的每一行就是一个Case,前面五个表示你... 阅读全文
posted @ 2013-04-15 16:59 Gifur 阅读(619) 评论(0) 推荐(0) 编辑
摘要:The Broken PedometerThe Problem题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2146题目的意思我是理解了,后来直接... 阅读全文
posted @ 2013-04-13 01:25 Gifur 阅读(340) 评论(0) 推荐(0) 编辑
摘要:Problem G. Birthday Cake题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=107&page=show_problem&problem=1108尽管以前做题不知不... 阅读全文
posted @ 2013-04-12 12:43 Gifur 阅读(417) 评论(0) 推荐(0) 编辑
摘要:Problem F:Ordering TasksInput:standard input;Output:standard outputTime Limit:1second; Memory Limit:32 MB(The Joint Effort Contest, Problem setter: Ro... 阅读全文
posted @ 2013-04-11 17:48 Gifur 阅读(306) 评论(0) 推荐(0) 编辑
摘要:Problem HMorning WalkTime Limit3 Seconds题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&proble... 阅读全文
posted @ 2013-04-11 16:08 Gifur 阅读(347) 评论(0) 推荐(0) 编辑
摘要: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... 阅读全文
posted @ 2013-04-11 11:00 Gifur 阅读(455) 评论(0) 推荐(0) 编辑
摘要:时间限制: 1000ms 内存限制: 256MB描述Alice和Bob还有其他几位好朋友在一起玩传话游戏。这个游戏是这样进行的:首先,所有游戏者按顺序站成一排,Alice站第一位,Bob站最后一位。然后,Alice想一句话悄悄告诉第二位游戏者,第二位游戏者又悄悄地告诉第三位,第三位又告诉第四位……以... 阅读全文
posted @ 2013-04-10 20:26 Gifur 阅读(446) 评论(0) 推荐(0) 编辑
摘要: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... 阅读全文
posted @ 2013-04-07 23:36 Gifur 阅读(854) 评论(2) 推荐(0) 编辑
摘要: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 ... 阅读全文
posted @ 2013-04-07 21:40 Gifur 阅读(424) 评论(0) 推荐(0) 编辑
摘要: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... 阅读全文
posted @ 2013-04-06 14:16 Gifur 阅读(765) 评论(13) 推荐(0) 编辑
摘要: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... 阅读全文
posted @ 2013-04-03 08:20 Gifur 阅读(412) 评论(0) 推荐(1) 编辑
摘要: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 ... 阅读全文
posted @ 2013-04-02 07:28 Gifur 阅读(299) 评论(0) 推荐(1) 编辑
摘要: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... 阅读全文
posted @ 2013-04-01 20:59 Gifur 阅读(351) 评论(0) 推荐(0) 编辑

TOP
点击右上角即可分享
微信分享提示