程序控

IPPP (Institute of Penniless Peasent-Programmer) Fellow

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::

2010年8月18日

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景The saying "You can't see the wood for the trees" is not only a cliche, but is also incorrect. The real problem is that you can't see the trees for the wo... 阅读全文
posted @ 2010-08-18 23:30 Devymex 阅读(2028) 评论(2) 推荐(1) 编辑

摘要: Problem问题The well-known physicist Alfred E Neuman is working on problems that involve multiplying polynomials of x and y. For example, he may need to calculate著名的物理学家纽曼(译注:杜撰人名)正在研究的问题中需要计算多项式的乘积,他可能需... 阅读全文
posted @ 2010-08-18 01:57 Devymex 阅读(1376) 评论(0) 推荐(0) 编辑

2010年8月17日

摘要: Background背景Problems that process input and generate a simple "yes" or "no" answer are called decision problems. One class of decision problems, the NP-complete problems, are not amenable to general e... 阅读全文
posted @ 2010-08-17 20:01 Devymex 阅读(2255) 评论(5) 推荐(1) 编辑

摘要: 概念全排列的生成算法有很多种,有递归遍例,也有循环移位法等等。C++/STL中定义的next_permutation和prev_permutation函数则是非常灵活且高效的一种方法,它被广泛的应用于为指定序列生成不同的排列。本文将详细的介绍prev_permutation函数的内部算法。按照STL... 阅读全文
posted @ 2010-08-17 02:37 Devymex 阅读(12060) 评论(13) 推荐(2) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Order is an important concept in mathematics and in computer science. For example, Zorn's Lemma states: "a partially ordered set in which every chain has ... 阅读全文
posted @ 2010-08-17 00:56 Devymex 阅读(1609) 评论(0) 推荐(0) 编辑

2010年8月16日

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Searching and sorting are part of the theory and practice of computer science. For example, binary search provides a good example of an easy-to-understand... 阅读全文
posted @ 2010-08-16 14:44 Devymex 阅读(1577) 评论(0) 推荐(1) 编辑

2010年8月15日

摘要: Background背景Trees are fundamental in many branches of computer science. Current state-of-the art parallel computers such as Thinking Machines' CM-5 are based on fat trees. Quad- and octal-trees are fu... 阅读全文
posted @ 2010-08-15 19:15 Devymex 阅读(3333) 评论(2) 推荐(1) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Filters, or programs that pass "processed" data through in some changed form, are an important class of programs in the UNIX operating system. A pipe is a... 阅读全文
posted @ 2010-08-15 15:17 Devymex 阅读(1957) 评论(0) 推荐(0) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Stacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, operating systems, and discrete even... 阅读全文
posted @ 2010-08-15 01:01 Devymex 阅读(6233) 评论(6) 推荐(1) 编辑

2010年8月14日

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Computer generated and assisted proofs and verification occupy a small niche in the realm of Computer Science. The first proof of the four-color problem w... 阅读全文
posted @ 2010-08-14 19:22 Devymex 阅读(2501) 评论(0) 推荐(2) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒The Problem问题This problem involves determining, for a group of gift-giving friends, how much more each person gives than they receive (and vice versa for those that v... 阅读全文
posted @ 2010-08-14 18:18 Devymex 阅读(2249) 评论(0) 推荐(0) 编辑

2010年8月13日

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Robotics, robot motion planning, and machine learning are areas that cross the boundaries of many of the subdisciplines that comprise Computer Science: ar... 阅读全文
posted @ 2010-08-13 23:37 Devymex 阅读(1247) 评论(0) 推荐(0) 编辑

摘要: Time limit: 3.000 seconds限时3.000秒Background背景Graph algorithms form a very important part of computer science and have a lineage that goes back at least to Euler and the famous Seven Bridges of Kö... 阅读全文
posted @ 2010-08-13 18:46 Devymex 阅读(2549) 评论(0) 推荐(1) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Problems that require minimum paths through some domain appear in many different areas of computer science. For example, one of the constraints in VLSI ro... 阅读全文
posted @ 2010-08-13 02:37 Devymex 阅读(3849) 评论(1) 推荐(2) 编辑

2010年8月12日

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Expression trees, B and B* trees, red-black trees, quad trees, PQ trees; trees play a significant role in many domains of computer science. Sometimes the ... 阅读全文
posted @ 2010-08-12 21:32 Devymex 阅读(3450) 评论(3) 推荐(0) 编辑

2010年8月11日

摘要: Time limit: 3.000 secondsBackgroundSimulation is an important application area in computer science involving the development of computer models to provide insight into real-world events. There are man... 阅读全文
posted @ 2010-08-11 03:08 Devymex 阅读(1067) 评论(0) 推荐(0) 编辑

2010年8月10日

摘要: Time limit: 3.000 seconds限时: 3.000秒Background背景Current work in cryptography involves (among other things) large prime numbers and computing powers of numbers modulo functions of these primes. Work in ... 阅读全文
posted @ 2010-08-10 22:22 Devymex 阅读(2005) 评论(2) 推荐(0) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景LISP was one of the earliest high-level programming languages and, with FORTRAN, is one of the oldest languages currently being used. Lists, which are the... 阅读全文
posted @ 2010-08-10 20:31 Devymex 阅读(3075) 评论(0) 推荐(1) 编辑

摘要: Time limit: 3.000 secondsBackgroundMany problems in Computer Science involve maximizing some measure according to constraints.Consider a history exam in which students are asked to put several histori... 阅读全文
posted @ 2010-08-10 15:22 Devymex 阅读(1743) 评论(0) 推荐(0) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Sorting holds an important place in computer science. Analyzing and implementing various sorting algorithms forms an important part of the education of mo... 阅读全文
posted @ 2010-08-10 03:05 Devymex 阅读(1485) 评论(0) 推荐(0) 编辑

2010年8月9日

摘要: 本博客致力于基础算法的学习与研究,文章每字每句都经过仔细斟酌。如果您对算法或C++/STL感兴趣,相信随便看看也会有所收获!OJ ProblemsOJ解题志关于OJ系列文章的说明转载:UVa OJ全部题目列表(按难度分级,仅标题)ZOJ 1002 - Fire NetUVa OJ 100 - The 3n + 1 problem (3n + 1问题)UVa OJ 101 - The Blocks Problem (积木问题)UVa OJ 102 - Ecological Bin Packing (生态学装箱问题)UVa OJ 103 - Stacking Boxes (嵌套盒子)UVa OJ 阅读全文
posted @ 2010-08-09 17:32 Devymex 阅读(23317) 评论(0) 推荐(1) 编辑

摘要: 概念凸包(Convex Hull)是一个计算几何(图形学)中的概念。用不严谨的话来讲,给定二维平面上的点集,凸包就是将最外层的点连接起来构成的凸多边型,它能包含点集中所有点的。严谨的定义和相关概念参见维基百科:凸包。这个算法是由数学大师葛立恒(Graham)发明的,他曾经是美国数学学会(AMS)主席... 阅读全文
posted @ 2010-08-09 17:06 Devymex 阅读(17399) 评论(5) 推荐(8) 编辑

摘要: Time limit: 3.000 secondsBackgroundSome problems are difficult to solve but have a simplification that is easy to solve. Rather than deal with the difficulties of constructing a model of the Earth (a ... 阅读全文
posted @ 2010-08-09 02:39 Devymex 阅读(1749) 评论(0) 推荐(0) 编辑

2010年8月8日

摘要: Time limit: 3.000 secondsBackgroundA problem that is simple to solve in one dimension is often much more difficult to solve in more than one dimension. Consider satisfying a boolean expression in conj... 阅读全文
posted @ 2010-08-08 15:56 Devymex 阅读(2427) 评论(0) 推荐(0) 编辑

摘要: Time limit: 3.000 secondsBackground(An homage to Theodore Seuss Geisel)The Cat in the Hat is a nasty creature,But the striped hat he is wearing has a rather nifty feature.With one flick of his wrist h... 阅读全文
posted @ 2010-08-08 03:56 Devymex 阅读(2311) 评论(0) 推荐(0) 编辑

2010年8月7日

摘要: ime Limit: 1 Second Memory Limit: 32768 KBBackgroundSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or... 阅读全文
posted @ 2010-08-07 13:16 Devymex 阅读(1754) 评论(0) 推荐(1) 编辑

摘要: 什么是UVa OJ?UVa OJ(英文)是西班牙巴利亚多利德大学提供的一套在线评判系统(OJ)。它提供多达近3000道ACM算法题,而且还在增加。任何人在免费注册后都可以浏览题目和提交自己的解答程序。服务器会自动编译你提交的代码,用特殊的数据(不是题目中的Test Case)进行测试,并立即做出评判。如果程序在限定条件内运行出符合要求的结果,系统会给出运行时间和下列结果:正确(Accepted, ... 阅读全文
posted @ 2010-08-07 04:30 Devymex 阅读(4415) 评论(1) 推荐(3) 编辑

摘要: Time limit: 3.000 secondsBackgroundWith the advent of high speed graphics workstations, CAD (computer-aided design) and other areas (CAM, VLSI design) have made increasingly effective use of computers... 阅读全文
posted @ 2010-08-07 03:08 Devymex 阅读(3046) 评论(1) 推荐(1) 编辑

2010年8月4日

摘要: Time limit: 3.000 secondsBackgroundCryptography deals with methods of secret communication that transform a message (the plaintext) into a disguised form (the ciphertext) so that no one seeing the cip... 阅读全文
posted @ 2010-08-04 17:42 Devymex 阅读(1475) 评论(0) 推荐(0) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景In the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given a 3-gallon jug and a 5-gallon jug... 阅读全文
posted @ 2010-08-04 16:08 Devymex 阅读(1566) 评论(0) 推荐(0) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景How can anagrams result from sequences of stack operations? There are two sequences of stack operators which can convert "TROT" to "TORT":怎样才能通过一系列的堆栈操作,将... 阅读全文
posted @ 2010-08-04 16:02 Devymex 阅读(2644) 评论(0) 推荐(1) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Some concepts in Mathematics and Computer Science are simple in one or two dimensions but become more complex when extended to arbitrary dimensions. Consi... 阅读全文
posted @ 2010-08-04 14:22 Devymex 阅读(2356) 评论(0) 推荐(0) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Bin packing, or the placement of objects of certain weights into different bins subject to certain constraints, is an historically interesting problem. So... 阅读全文
posted @ 2010-08-04 14:05 Devymex 阅读(2467) 评论(0) 推荐(0) 编辑

摘要: Time limit: 3.000 second限时:3.000秒Background背景Many areas of Computer Science use simple, abstract domains for both analytical and empirical studies. For example, an early AI study of planning and robot... 阅读全文
posted @ 2010-08-04 14:01 Devymex 阅读(9362) 评论(0) 推荐(2) 编辑

摘要: Time limit: 3.000 seconds限时:3.000秒Background背景Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs.计算 阅读全文
posted @ 2010-08-04 13:46 Devymex 阅读(6649) 评论(5) 推荐(2) 编辑