08 2012 档案
摘要:Jamie's Contact GroupsTime Limit: 7000MSMemory Limit: 65536KTotal Submissions: 5298Accepted: 1682DescriptionJamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. The contact list has become so long that it often takes a long
阅读全文
摘要:Rain on your ParadeTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 655350/165535 K (Java/Others) Total Submission(s): 1887 Accepted Submission(s): 563 Problem DescriptionYou’re giving a party in the garden of your villa by the sea. The party is a huge success, and everyone is here. It’s a warm,
阅读全文
摘要:The Worm in the AppleTime Limit: 50000/20000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 7 Accepted Submission(s): 5 Problem DescriptionWilly the Worm was living happily in an apple – until some vile human picked the apple, and started to eat it! Now, Willy must e
阅读全文
摘要:增广路方法: ①一般增广路算法O(mnU):采取标号法每次在容量网络中寻找一条增广路(或者在残留网络中,每次任意找一条增广路),知道不存在增广路。模板:View Code 1 #include 2 #include 3 #include 4 #include 5 usi...
阅读全文
摘要:集合划分Time Limit: 1000 MSMemory Limit: 65535 KDescription对于从1到N (1 <= N <= 39) 的连续整数集合,能划分成两个子集合,且保证每个集合的数字和是相等的。举个例子,如果N=3,对于{1,2,3}能划分成两个子集合,每个子集合的所有数字和是相等的: {3} 和 {1,2} 这是唯一一种分法(交换集合位置被认为是同一种划分方案,因此不会增加划分方案总数) 如果N=7,有四种方法能划分集合{1,2,3,4,5,6,7},每一种分法的子集合各数字和是相等的: {1,6,7} 和 {2,3,4,5} {注 1+6+7=2+3
阅读全文
摘要:游河Time Limit: 1000 MSMemory Limit: 65535 KTotal Submit: 71(14 users)Total Accepted: 41(14 users)Special Judge: NoDescription 假期,Hrbust集训队在Tang长老的带领下去河上坐船游玩。 但是很多队员想单独坐船游览风光,体验一个人的旅行。 但是教主说那样会很危险,而且似乎也没那么多的旅行路线。可是队员们还是坚持自己的想法,于是教主提了个要求:如果游览的路线足够一人一条,而且每条路线没有重复的水路的话,就同意大家的做法,不然,Tang长老就请大家集体吃冰棍,一起坐船去。集
阅读全文
摘要:PIGSTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 12372Accepted: 5476DescriptionMirko works on a pig farm that consists of M locked pig-houses and Mirko can't unlock any pighouse because he doesn't have the keys. Customers come to the farm one after another. Each of them has keys
阅读全文
摘要:Digit SequenceTime Limit: 1000 MSMemory Limit: 65535 KDescriptionDawn is playing a game with some children. He gives them several arithmetic expressions and then asks them whether these expressions' value can form a digit sequence. The value of an expression is just the result we calculate them.
阅读全文
摘要:子序列的和Time Limit: 1000 MSMemory Limit: 32768 KDescription输入一个长度为n的整数序列(A1,A2,……,An),从中找出一段连续的长度不超过m的子序列,使得这个子序列的和最大。Input有多组测试数据,不超过20组测试数据。对于每组测试的第一行,包含两个整数n和m(n,m<=10^5),表示有n个数,子序列长度限制为m,表示这个序列的长度,第二行为n个数,每个数的范围为[-1000, 1000]。Output对于每组测试数据,输出最大的子序列和,并换行。Sample Input3 11 2 33 2-1000 1000 1Sample
阅读全文
摘要:AssembleTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2578Accepted: 837DescriptionRecently your team noticed that the computer you use to practice for programming contests is not good enough anymore. Therefore, you decide to buy a new computer.To make the ideal computer for your needs, yo
阅读全文
摘要:Escape from Enemy TerritoryTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 2035Accepted: 581DescriptionA small group of commandos has infiltrated deep into enemy territory. They have just accomplished their mission and now have to return to their rendezvous point. Of course they don’t want
阅读全文
摘要:POJ1469习惯性的不写return 0;这次尝到苦头了,很幸福的WA了……找了好久才知道是这个坏毛病……View Code 1 #include <cstdio> 2 #include <cmath> 3 #include <cstring> 4 #include <iostream> 5 #include <algorithm> 6 using namespace std; 7 const int M=300; 8 bool vis[M]; 9 bool bmap[M][M];10 int cx[M],cy[M];11 int
阅读全文
摘要:POJ 拓扑排序题目总结1270 Following Orders给出一个字母表和一些字母对(char1,char2)表示char1一定要在char2前面。求出所有满足要求的排列,并按照字典序输出。这题一定要注意,字母表不一定是有序的,其实也就是注意要按照字典序输出即可。2585 Following Orders有一个4*4的矩形,然后有9个2*2的矩形,固定位置,固定编号,给出一个4*4矩形的状态图,问这种覆盖是否合法。根据小矩形上出现的数字判定矩形的先后性,然后判定是否存在拓扑序列。1128 Frame Stacking(the same as USACO Trainning frameu
阅读全文

浙公网安备 33010602011771号