上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: 题目: 相邻两个点不能相同颜色坑爹。。今天用BFS写怎么写怎么错题目: 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 only four colors, in such a way that no region is colored using the same color as a neighbor region.Here you 阅读全文
posted @ 2013-11-24 21:52 doubleshik 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 典型拓扑排序 记录个模板题目:Problem FOrdering TasksInput: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MBJohn has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if other tasks have already been executed.InputThe input will c 阅读全文
posted @ 2013-11-24 17:52 doubleshik 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目就是找出和 erdos这个人合著书的关系。 第一合作是1 。 然后和第一合作的作者有关系的是2.。。第一次用stl写了写。。虽然写的蛮恶心的题目:Problem F: Erdös Numbers BackgroundThe Hungarian Paul Erdös (1913-1996, speak as ``Ar-dish'') not only was one of the strangest mathematicians of the 20th century, he was also one of the most famous. He kept 阅读全文
posted @ 2013-11-24 00:49 doubleshik 阅读(595) 评论(0) 推荐(0) 编辑
摘要: 题目意思就是通过一系列翻煎饼的动作让整个堆保持递增顺序在学习STL 从网上复制了别人的代码学习一下。。非常简洁题目:Stacks of FlapjacksBackgroundStacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, operating systems, and discrete event simulation. Stacks are also important in the theory of fo 阅读全文
posted @ 2013-11-23 16:14 doubleshik 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目是说给出一颗满2叉树 。 然后这些节点会下落,找出同一竖直位置叶子值之和。网上看到不用建树的方法比较简便题目:The Falling LeavesEach year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed quickly by the falling leaves accumulating under the trees. If the same thing happened to binary trees, h 阅读全文
posted @ 2013-11-23 11:48 doubleshik 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 做这道题的时候傻X错误百出。。。在计算总和上错了好久。还把=写成了==。。。。蛋疼无比题意就是合并两颗4叉树。 然后按照要求计算值。。主要用了个递归 。 没有像网上其他一些解法用结构指针什么的。。单用了数组题目QuadtreesA quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be split into four quadrants. Each quadrant may again be split 阅读全文
posted @ 2013-11-22 21:36 doubleshik 阅读(498) 评论(0) 推荐(0) 编辑
摘要: 一道类似括号匹配的题目。 一负一正组成一个括号。 然后 某一个括号内部第一层括号之和严格小于这层的值写的有些蛋疼题目:Problem B - Generalized MatrioshkasVladimir worked for years making matrioshkas, those nesting dolls that certainly represent truly Russian craft. A matrioshka is a doll that may be opened in two halves, so that one finds another doll inside 阅读全文
posted @ 2013-11-22 18:36 doubleshik 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 题目就是根据题意进行四个操作 。。复制一下别人的翻译:The valid commands for the robot arm that manipulates blocks are:机械臂操作积木的有效指令列举如下:move a onto bwhere a and b are block numbers, puts block a onto block b after returning any blocks that are stacked on top of blocks a and b to their initial positions.a和b都是积木的编号,先将a和b上面所有的积木 阅读全文
posted @ 2013-11-21 23:27 doubleshik 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 给出一堆乌龟名字,乌龟能从本身位置爬到顶端。 要求求出从原本的顺序到目标顺序的最小操作。分别比较org和after 。 一样就都向上,否则org向上继续匹配。最终after上方剩下的就是org里要移动的题目:Problem D: ShellSort He made each turtle stand on another one's backAnd he piled them all up in a nine-turtle stack.And then Yertle climbed up. He sat down on the pile.What a wonderful v 阅读全文
posted @ 2013-11-21 11:12 doubleshik 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 题目就是给出一些点,求哪一个三角形不包含其他点且面积最大。题目中也给出了一个计算面积的公式。要注意的是判断double类型面积相等注意精度问题。写的时候忘记了给面积加绝对值题目:Problem B: Myacm TrianglesSource file:triangle.{c, cpp, java, pas}Input file:triangle.inOutput file:triangle.outThere has been considerable archeological work on the ancient Myacm culture. Many artifacts have be 阅读全文
posted @ 2013-11-21 09:16 doubleshik 阅读(232) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 下一页