随笔分类 - 

摘要:E -Guardian of DecencyTime Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusAppoint description:DescriptionProblem H - Guardian of DecencyTime limit: 15 secondsFrank N. Stein is a very conservative high-school teacher. He wants to take some of his students on an excursion, but 阅读全文
posted @ 2013-07-27 12:47 剑不飞 阅读(216) 评论(0) 推荐(0)
摘要:A -AntsTime Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusAppoint description:DescriptionYoung naturalist Bill studies ants in school. His ants feed on plant-louses that live on apple trees. Each ant colony needs its own apple tree to feed itself.Bill has a map with coordina 阅读全文
posted @ 2013-07-27 12:42 剑不飞 阅读(325) 评论(0) 推荐(0)
摘要:Warm upTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 955Accepted Submission(s): 193 Problem Description N planets are connected by M bidirectional channels that allow instant transportation. It's always possible to travel between any two pl 阅读全文
posted @ 2013-07-26 18:51 剑不飞 阅读(219) 评论(0) 推荐(0)
摘要:Warm up 2Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 449Accepted Submission(s): 225 Problem Description Some 1×2 dominoes are placed on a plane. Each dominoe is placed either horizontally or vertically. It's guaranteed the dominoes in 阅读全文
posted @ 2013-07-26 12:47 剑不飞 阅读(228) 评论(0) 推荐(0)
摘要:Girls and BoysTime Limit:10000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:Descriptionthe second year of the university somebody started a study on the romantic relations between the students. The relation “romantically involved” is defined between one girl 阅读全文
posted @ 2013-07-19 16:47 剑不飞 阅读(209) 评论(0) 推荐(0)
摘要:过山车Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6952Accepted Submission(s): 3020Problem DescriptionRPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只 阅读全文
posted @ 2013-07-15 19:18 剑不飞 阅读(146) 评论(0) 推荐(0)
摘要:Problem HHalumTime Limit : 3 secondsYou are given a directed graph G(V,E) with a set of vertices and edges. Each edge (i,j) that connects some vertex i to vertex j has an integer cost associated with that edge.Define the operation Halum(v, d) to operate on a vertex v using an integer d as follows: s 阅读全文
posted @ 2013-07-11 10:39 剑不飞 阅读(228) 评论(0) 推荐(0)
摘要:Fence LoopsThe fences that surround Farmer Brown's collection of pastures have gotten out of control. They are made up of straight segments from 1 through 200 feet long that join together only at their endpoints though sometimes more than two fences join together at a given endpoint. The result 阅读全文
posted @ 2013-07-08 19:32 剑不飞 阅读(206) 评论(0) 推荐(0)
摘要:DescriptionThe army of United Nations launched a new wave of air strikes on terrorist forces. The objective of the mission is to reduce enemy's logistical mobility. Each air strike will destroy a path and therefore increase the shipping cost of the shortest path between two enemy locations. The 阅读全文
posted @ 2013-07-07 17:25 剑不飞 阅读(249) 评论(0) 推荐(0)
摘要:DescriptionProblem C: A Walk Through the ForestJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to walk home. To make things even nicer, his office is on one side of a forest, and his house is on the other 阅读全文
posted @ 2013-07-07 12:04 剑不飞 阅读(382) 评论(0) 推荐(0)
摘要:DescriptionProblem D: Airport ExpressIn a small city called Iokh, a train service,Airport-Express, takes residents to the airport more quickly than other transports. There are two types of trains in Airport-Express, theEconomy-Xpressand theCommercial-Xpress. They travel at different speeds, take dif 阅读全文
posted @ 2013-07-07 11:18 剑不飞 阅读(250) 评论(0) 推荐(0)
摘要:DescriptionAs you must have experienced, instead of landing immediately, an aircraft sometimes waits in a holding loop close to the runway. This holding mechanism is required by air traffic controllers to space apart aircraft as much as possible on the runway (while keeping delays low). It is formal 阅读全文
posted @ 2013-07-06 11:22 剑不飞 阅读(184) 评论(0) 推荐(0)
摘要:Problem B: The Largest CliqueGiven a directed graphG, consider the following transformation. First, create a new graphT(G)to have the same vertex set asG. Create a directed edge between two verticesuandvinT(G)if and only if there is a path betweenuandvinGthat follows the directed edges only in the f 阅读全文
posted @ 2013-07-05 16:09 剑不飞 阅读(166) 评论(0) 推荐(0)
摘要:Consider the following exercise, found in a generic linear algebra textbook.LetAbe ann×nmatrix. Prove that the following statements are equivalent:Ais invertible.Ax = bhas exactly one solution for everyn× 1 matrixb.Ax = bis consistent for everyn× 1 matrixb.Ax = 0has only the trivial s 阅读全文
posted @ 2013-07-04 21:46 剑不飞 阅读(213) 评论(0) 推荐(0)
摘要:Being a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, and drinking with the other knights are fun things to do. Therefore, it is not very surprising that in recent years the kingdom of King Arthur has experienced an unprecedented increase in the number 阅读全文
posted @ 2013-06-29 21:49 剑不飞 阅读(231) 评论(0) 推荐(0)
摘要:King Arthur's KnightsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1403Accepted Submission(s): 606Special JudgeProblem DescriptionI am the bone of my sword. Steel is my body, and the fire is my blood.- from Fate / Stay NightYou must have know 阅读全文
posted @ 2013-06-22 11:21 剑不飞 阅读(228) 评论(0) 推荐(0)
摘要:Given a sequence of integers,a1,a2,...,an, we define itssign matrix Ssuch that, for1ijn,Sij= `` + "ifai+...+aj> 0;Sij= `` - "ifai+...+ajf[i-1],f[j] #include #include #include using namespace std; const int mm=15; vector g[mm]; int id[mm],f[mm],ans[mm]; int cas,n; void get(int n) { char 阅读全文
posted @ 2013-06-21 12:08 剑不飞 阅读(132) 评论(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 their meeting point. The figure below shows a segment of the necklace:But, alas! One day, the necklace was torn and the beads were all scattered ove. 阅读全文
posted @ 2013-06-20 21:24 剑不飞 阅读(233) 评论(0) 推荐(0)
摘要:PartyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2997Accepted Submission(s): 934Problem Description有n对夫妻被邀请参加一个聚会,因为场地的问题,每对夫妻中只有1人可以列席。在2n 个人中,某些人之间有着很大的矛盾(当然夫妻之间是没有矛盾的),有矛盾的2个人是不会同时出现在聚会上的。有没有可能会有n 个人同时列席?Inputn: 表示有n对夫妻被邀请 (n #include #inclu 阅读全文
posted @ 2013-06-04 18:56 剑不飞 阅读(162) 评论(0) 推荐(0)