04 2013 档案

POJ 1949 Chores 拓扑排序
摘要:ChoresTime Limit:3000MSMemory Limit:30000KTotal Submissions:4608Accepted:2146DescriptionFarmer John's family pitches in with the chores during milking, doing all the chores as quickly as possible. At FJ's house, some chores cannot be started until others have been completed, e.g., it is impo 阅读全文

posted @ 2013-04-30 21:34 _log__ 阅读(281) 评论(0) 推荐(0) 编辑

POJ 3686 The Windy's 二分图最差匹配
摘要:The Windy'sTime Limit:5000MSMemory Limit:65536KTotal Submissions:3274Accepted:1395DescriptionThe Windy's is a world famous toy factory that ownsMtop-class workshop to make toys. This year the manager receivesNorders for toys. The manager knows that every order will take different amount of h 阅读全文

posted @ 2013-04-30 16:53 _log__ 阅读(145) 评论(0) 推荐(0) 编辑

POJ 3298 Antimonotonicity 差分约束
摘要:AntimonotonicityTime Limit:2000MSMemory Limit:65536KTotal Submissions:2811Accepted:1202DescriptionI have a sequenceFredof lengthncomprised of integers between 1 andninclusive. The elements ofFredare pairwise distinct. I want to find a subsequenceMaryofFredthat is as long as possible and has the prop 阅读全文

posted @ 2013-04-30 16:41 _log__ 阅读(180) 评论(0) 推荐(0) 编辑

HDU 1384 Intervals 差分约束
摘要:IntervalsTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2139Accepted Submission(s): 760 Problem DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn.Write a program that:> reads the number of intervals, the 阅读全文

posted @ 2013-04-30 16:27 _log__ 阅读(195) 评论(0) 推荐(0) 编辑

HDU 3336 Count the string KMP
摘要:Count the stringProblem DescriptionIt is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For example: s: "abab" The prefixes are: "a", "ab", " 阅读全文

posted @ 2013-04-23 21:56 _log__ 阅读(113) 评论(0) 推荐(0) 编辑

POJ 2299 Ultra-QuickSort 树状数组
摘要:Ultra-QuickSortTime Limit: 7000MSMemory Limit: 65536KTotal Submissions: 32009Accepted: 11395DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sort. 阅读全文

posted @ 2013-04-23 21:48 _log__ 阅读(132) 评论(0) 推荐(0) 编辑

POJ 2352 Stars 树状数组
摘要:StarsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 25425Accepted: 11109DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to 阅读全文

posted @ 2013-04-23 21:41 _log__ 阅读(104) 评论(0) 推荐(0) 编辑

HDU 2571 命运 动态规划
摘要:命运Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5913 Accepted Submission(s): 2092 Problem Description穿过幽谷意味着离大魔王lemon已经无限接近了! 可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑! 可怜的yifenfei为了去救MM,义无返顾地跳进了迷宫。让. 阅读全文

posted @ 2013-04-18 23:11 _log__ 阅读(185) 评论(0) 推荐(0) 编辑

HDU 2059 龟兔赛跑 动态规划
摘要:龟兔赛跑Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7949Accepted Submission(s): 3047 Problem Description据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输给乌龟后,心中郁闷,发誓要报仇雪恨,于是躲进了杭州下沙某农业园卧薪尝胆潜心修炼,终于练成了绝技,能够毫不休息得以恒定的速度(VR m/s)一直跑。兔子一直想找机会好好得教训一下乌龟,以雪前耻。 最近正值HDU举办50周年校庆 阅读全文

posted @ 2013-04-18 23:01 _log__ 阅读(151) 评论(0) 推荐(0) 编辑

POJ 3009 深搜 Curling 2.0
摘要:Curling 2.0Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8062Accepted: 3337DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a square mesh is marked. 阅读全文

posted @ 2013-04-18 13:16 _log__ 阅读(118) 评论(0) 推荐(0) 编辑

HDU 3790 最短路径问题
摘要:最短路径问题Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是两个数 s,t;起点s,终点。n和m为0时输入结束。 (1<n<=1000, 0<m<100000, s != t)Output输出 一行有两个数, 最短距离及其花费。Sample Input3 2 1 2 5 6 2 3 4 5 1 3 阅读全文

posted @ 2013-04-18 12:57 _log__ 阅读(148) 评论(0) 推荐(0) 编辑

POJ 1328 Radar Installation 贪心
摘要:Radar InstallationDescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, so an island in the sea can be co. 阅读全文

posted @ 2013-04-10 17:37 _log__ 阅读(144) 评论(0) 推荐(0) 编辑

POJ 2533 Longest Ordered Subsequence 最长上升子序列
摘要:Longest Ordered SubsequenceDescriptionA numeric sequence ofaiis ordered ifa1<a2< ... <aN. Let the subsequence of the given numeric sequence (a1,a2, ...,aN) be any sequence (ai1,ai2, ...,aiK), where 1 <=i1<i2< ... <iK<=N. For example, sequence (1, 7, 3, 5, 9, 4, 8) has ordered 阅读全文

posted @ 2013-04-09 23:27 _log__ 阅读(145) 评论(0) 推荐(0) 编辑

POJ A Simple Problem with Integers 线段树的成段更新
摘要:A Simple Problem with IntegersDescriptionYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the sum of numbers in a given interval.InputThe first line con. 阅读全文

posted @ 2013-04-09 21:47 _log__ 阅读(159) 评论(0) 推荐(0) 编辑

POJ 2367 Genealogical tree 拓扑排序
摘要:Genealogical treeDescriptionThe system of Martians' blood relations is confusing enough. Actually, Martians bud when they want and where they want. They gather together in different groups, so that a Martian can have one parent as well as ten. Nobody will be surprised by a hundred of children. M 阅读全文

posted @ 2013-04-08 11:44 _log__ 阅读(297) 评论(0) 推荐(0) 编辑

POJ 1611 The Suspects 并查集
摘要:The SuspectsDescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to separate the suspects from others. In the Not-Spreading-Your-Sickness Univers. 阅读全文

posted @ 2013-04-03 09:36 _log__ 阅读(153) 评论(0) 推荐(0) 编辑

POJ 2387 Til the Cows Come Home 最短路
摘要:Til the Cows Come HomeDescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get back as quickly as possible. Farmer John's field has N (2 <= 阅读全文

posted @ 2013-04-01 22:10 _log__ 阅读(199) 评论(0) 推荐(0) 编辑