随笔分类 -  二部图 2--SAT

摘要:Sorting SlidesTime Limit:1000MSMemory Limit:10000KTotal Submissions:2831Accepted:1076DescriptionProfessor Clumsey is going to give an important talk this afternoon. Unfortunately, he is not a very tidy person and has put all his transparencies on one big heap. Before giving the talk, he has to sort 阅读全文
posted @ 2013-07-10 15:19 Jack Ge 阅读(390) 评论(0) 推荐(0) 编辑
摘要:Perfect ElectionTime Limit:5000MSMemory Limit:65536KTotal Submissions:438Accepted:223DescriptionIn a country (my memory fails to say which), the candidates {1, 2 ..., N} are running in the parliamentary election. An opinion poll asks the question "For any two candidates of your own choice, whic 阅读全文
posted @ 2013-07-09 20:45 Jack Ge 阅读(383) 评论(0) 推荐(0) 编辑
摘要:Map LabelerTime Limit:1000MSMemory Limit:65536KTotal Submissions:1267Accepted:409DescriptionMap generation is a difficult task in cartography. A vital part of such task is automatic labeling of the cities in a map; where for each city there is text label to be attached to its location, so that no tw 阅读全文
posted @ 2013-07-09 19:31 Jack Ge 阅读(288) 评论(0) 推荐(0) 编辑
摘要:Bomb GameTime Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2754Accepted Submission(s): 918Problem DescriptionRobbie is playing an interesting computer game. The game field is an unbounded 2-dimensional region. There are N rounds in the game. At each 阅读全文
posted @ 2013-07-09 19:07 Jack Ge 阅读(179) 评论(0) 推荐(0) 编辑
摘要:Priest John's Busiest DayTime Limit:2000MSMemory Limit:65536KTotal Submissions:6900Accepted:2363Special JudgeDescriptionJohn 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 couple who get married on that da 阅读全文
posted @ 2013-07-09 18:11 Jack Ge 阅读(429) 评论(0) 推荐(0) 编辑
摘要:Katu PuzzleTime Limit:1000MSMemory Limit:65536KTotal Submissions:6553Accepted:2401DescriptionKatu 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 valu 阅读全文
posted @ 2013-07-09 16:29 Jack Ge 阅读(448) 评论(0) 推荐(0) 编辑
摘要:WeddingTime Limit:1000MSMemory Limit:65536KTotal Submissions:6673Accepted:2033Special JudgeDescriptionUp to thirty couples will attend a wedding feast, at which they will be seated on either side of a long table. The bride and groom sit at one end, opposite each other, and the bride wears an elabora 阅读全文
posted @ 2013-07-09 15:52 Jack Ge 阅读(324) 评论(0) 推荐(0) 编辑
摘要:Ikki's Story IV - Panda's TrickTime Limit:1000MSMemory Limit:131072KTotal Submissions:6691Accepted:2496Descriptionliympanda, one of Ikki’s friend, likes playing games with Ikki. Today after minesweeping with Ikki and winning so many times, he is tired of such easy games and wants to play ano 阅读全文
posted @ 2013-07-09 15:09 Jack Ge 阅读(339) 评论(0) 推荐(0) 编辑
摘要:Strategic GameTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3580Accepted Submission(s): 1573Problem DescriptionBob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is v 阅读全文
posted @ 2013-05-21 11:46 Jack Ge 阅读(513) 评论(0) 推荐(0) 编辑
摘要:二分图的定义:二分图是这样一个图,它的顶点可以分类两个集合X和Y,所有的边关联在两个顶点中,恰好一个属于集合X,另一个属于集合Y。未盖点 :设Vi是图G的一个顶点,如果Vi 不与任意一条属于匹配M的边相关联,就称Vi 是一个未盖点。交错路:设P是图G的一条路,如果P的任意两条相邻的边一定是一条属于M而另一条不属于M,就称P是一条交错路。可增广路:两个端点都是未盖点的交错路叫做可增广路。最大匹配:图中包含边数最多的匹配称为图的最大匹配。完美匹配: 如果所有点都在匹配边上,称这个最大匹配是完美匹配。最小覆盖:在一个二分图上用最少的点(x 或 y 集合的都行),让每条连接两个点集的边都至少和其中一个 阅读全文
posted @ 2013-05-03 22:55 Jack Ge 阅读(359) 评论(0) 推荐(0) 编辑
摘要:Antenna PlacementTime Limit:1000MSMemory Limit:65536KTotal Submissions:5302Accepted:2645DescriptionThe Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason why they got the job, is their discovery of a new, 阅读全文
posted @ 2013-05-03 22:46 Jack Ge 阅读(160) 评论(0) 推荐(0) 编辑
摘要:Muddy FieldsTime Limit:1000MSMemory Limit:65536KTotal Submissions:6798Accepted:2506DescriptionRain has pummeled the cows' field, a rectangular grid of R rows and C columns (1 #include#includeusing namespace std;int n,m,cnt1,cnt2,map[2520][2520],linker[2520],vis[2520];int g1[60][60],g2[60][60],tg 阅读全文
posted @ 2013-05-03 18:38 Jack Ge 阅读(332) 评论(0) 推荐(0) 编辑
摘要:Selecting CoursesTime Limit:1000MSMemory Limit:65536KTotal Submissions:7635Accepted:3367DescriptionIt is well known that it is not easy to select courses in the college, for there is usually conflict among the time of the courses. Li Ming is a student who loves study every much, and at the beginning 阅读全文
posted @ 2013-05-03 16:44 Jack Ge 阅读(333) 评论(0) 推荐(0) 编辑
摘要:Treasure ExplorationTime Limit:6000MSMemory Limit:65536KTotal Submissions:5875Accepted:2343DescriptionHave you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever explored treasure? If you never have such experiences, you would never kn 阅读全文
posted @ 2013-05-03 13:13 Jack Ge 阅读(241) 评论(0) 推荐(0) 编辑
摘要:Repairing CompanyTime Limit:1000MSMemory Limit:131072KTotal Submissions:5696Accepted:1530DescriptionLily runs a repairing company that services theQblocks in the city. One day the company receivesMrepair tasks, theith of which occurs in blockpi, has a deadlinetion any repairman’s arrival, which is a 阅读全文
posted @ 2013-04-14 09:44 Jack Ge 阅读(288) 评论(0) 推荐(0) 编辑
摘要:Uncle Tom's Inherited Land*Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 11Accepted Submission(s) : 7Special JudgeProblem DescriptionYour old uncle Tom inherited a piece of land from his great-great-uncle. Originally, the property had been in 阅读全文
posted @ 2013-04-11 21:48 Jack Ge 阅读(342) 评论(0) 推荐(0) 编辑
摘要:50 years, 50 colorsTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 12Accepted Submission(s) : 8Problem DescriptionOn Octorber 21st, HDU 50-year-celebration, 50-color balloons floating around the campus, it's so nice, isn't it? To celebrate t 阅读全文
posted @ 2013-04-11 12:20 Jack Ge 阅读(237) 评论(0) 推荐(0) 编辑
摘要:Machine ScheduleTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 30Accepted Submission(s) : 19Problem DescriptionAs we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduli 阅读全文
posted @ 2013-04-10 22:56 Jack Ge 阅读(417) 评论(0) 推荐(0) 编辑
摘要:National TreasuresTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 3Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionThe great hall of the national museum has been robbed few times recently. Everyone is now 阅读全文
posted @ 2013-03-16 12:07 Jack Ge 阅读(423) 评论(0) 推荐(0) 编辑
摘要:棋盘游戏Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 1Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个 阅读全文
posted @ 2013-03-16 11:30 Jack Ge 阅读(301) 评论(0) 推荐(0) 编辑

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