摘要: DescriptionAfter successive failures in the battles against the Union, the Empire retreated to its last stronghold. Depending on its powerful defense system, the Empire repelled the six waves of Union's attack. After several sleepless nights of thinking, Arthur, General of the Union, noticed tha 阅读全文
posted @ 2013-07-17 23:27 Oyking 阅读(1776) 评论(3) 推荐(1) 编辑
摘要: DescriptionThousands of thousands years ago there was a small kingdom located in the middle of the Pacific Ocean. The territory of the kingdom consists two separated islands. Due to the impact of the ocean current, the shapes of both the islands became convex polygons. The king of the kingdom wanted 阅读全文
posted @ 2013-07-17 21:53 Oyking 阅读(266) 评论(0) 推荐(0) 编辑
摘要: DescriptionFeng shui is the ancient Chinese practice of placement and arrangement of space to achieve harmony with the environment. George has recently got interested in it, and now wants to apply it to his home and bring harmony to it.There is a practice which says that bare floor is bad for living 阅读全文
posted @ 2013-07-17 12:37 Oyking 阅读(484) 评论(0) 推荐(0) 编辑
摘要: DescriptionOnce upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build a beautiful brick wall with a perfect shape and nice tall towers. Instead, he o 阅读全文
posted @ 2013-07-16 13:58 Oyking 阅读(243) 评论(0) 推荐(0) 编辑
摘要: DescriptionGivennsegments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected segments have at least one point in common.InputInput begins with a numberTshowing the number of test cases and then,Ttest c 阅读全文
posted @ 2013-07-14 21:13 Oyking 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 struct Tpoint{ 8 double x, y, z; 9 };10 11 inline double length(Tpoint A, Tpoint B){12 double x = A.x - B.x, y = A.y - B.y, z = A.z - B.z;13 return sqrt(x * x + y * y + z * z);14 }15 16 inline double across(Tpoi... 阅读全文
posted @ 2013-07-13 22:44 Oyking 阅读(225) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe stable marriage problem consists of matching members of two different sets according to the member’s preferences for the other set’s members. The input for our problem consists of:a set M of n males;a set F of n females;for each male and female we have a list of all the members of the 阅读全文
posted @ 2013-07-09 23:01 Oyking 阅读(454) 评论(0) 推荐(0) 编辑
摘要: DescriptionJohn is the only priest in his town. September 1st is the John's busiest day in a year because there is an old legend in the town that the ... 阅读全文
posted @ 2013-07-09 17:12 Oyking 阅读(385) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionConflicts are everywhere in the world, from the young to the elderly, from families to countries. Conflicts cause quarrels, fights or even wars. How wonderful the world will be if all conflicts can be eliminated.Edward contributes his lifetime to invent a 'Conflict Resolution 阅读全文
posted @ 2013-07-08 18:33 Oyking 阅读(280) 评论(0) 推荐(0) 编辑
摘要: DescriptionKatu Puzzle is presented as a directed graphG(V,E) with each edgee(a,b) labeled by a boolean operatorop(one of AND, OR, XOR) and an integerc(0 ≤c≤ 1). One Katu is solvable if one can find each vertexVia valueXi(0 ≤Xi≤ 1) such that for each edgee(a,b) labeled byopandc, the following formul 阅读全文
posted @ 2013-07-08 15:29 Oyking 阅读(290) 评论(0) 推荐(0) 编辑