09 2012 档案

ZOJ 3647 Gao the Grid (n*m 中格点三角形个数)
摘要:Gao the GridTime Limit: 2 Seconds Memory Limit: 65536 KBA n * m grid as follow:Count the number of triangles, three of whose vertice must be grid-points.Note that the three vertice of the triangle must not be in a line(the right picture is not a triangle). InputThe input consists of several cases... 阅读全文

posted @ 2012-09-30 23:15 kuangbin 阅读(1982) 评论(1) 推荐(0)

ZOJ 3644 Kitty's Game (广搜,STL中的map,vector)
摘要:Kitty's GameTime Limit: 2 Seconds Memory Limit: 65536 KBKitty is a little cat. She is crazy about a game recently.There are n scenes in the game(mark from 1 to n). Each scene has a number pi. Kitty's score will become least_common_multiple(x,pi) when Kitty enter the ith scene. x is the score 阅读全文

posted @ 2012-09-30 22:49 kuangbin 阅读(469) 评论(0) 推荐(0)

HDU 1964 Pipes(插头DP)
摘要:PipesTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 301Accepted Submission(s): 154Problem DescriptionThe construction of office buildings has become a very standardized task. Pre-fabricated modules are combined according to the customer’s needs, s 阅读全文

posted @ 2012-09-30 20:59 kuangbin 阅读(1098) 评论(0) 推荐(0)

POJ 3133 Manhattan Wiring(插头DP)
摘要:Manhattan WiringTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 1112Accepted: 636DescriptionThere is a rectangular area containing n × m cells. Two cells are marked with “2”, and another two with “3”. Some cells are occupied by obstacles. You should connect the two “2”s and also the tw 阅读全文

posted @ 2012-09-30 16:28 kuangbin 阅读(1048) 评论(0) 推荐(0)

POJ 1739 Tony's Tour(插头DP)
摘要:Tony's TourTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 2648Accepted: 1197DescriptionA square township has been divided up into n*m(n rows and m columns) square plots (1<=N,M<=8),some of them are blocked, others are unblocked. The Farm is located in the lower left plot and the 阅读全文

posted @ 2012-09-30 10:39 kuangbin 阅读(1944) 评论(4) 推荐(0)

Ural 1519 Formula 1 (插头DP)
摘要:1519. Formula 1Time Limit: 1.0 secondMemory Limit: 16 MBBackgroundRegardless of the fact, that Vologda could not get rights to hold the Winter Olympic games of 20**, it is well-known, that the city will conduct one of the Formula 1 events. Surely, for such an important thing a new race circuit shoul 阅读全文

posted @ 2012-09-29 23:25 kuangbin 阅读(2851) 评论(0) 推荐(1)

ZOJ 3466 The Hive II (插头DP)
摘要:The Hive IITime Limit: 5 Seconds Memory Limit: 65536 KBThere is a hive in the village. Like this. There are 8 columns(from A to H) in this hive. Different colums have the same number of grids. Every grid has its own coordinate, which is formed by two uppercases, representing the row index and the c. 阅读全文

posted @ 2012-09-29 21:01 kuangbin 阅读(857) 评论(0) 推荐(0)

二维凸包模板
摘要:#include<stdio.h>#include<math.h>#include<algorithm>#include<iostream>using namespace std;const int MAXN=1000;struct point{ int x,y;};point list[MAXN];int stack[MAXN],top;int cross(point p0,point p1,point p2) //计算叉积 p0p1 X p0p2 { return (p1.x-p0.x)*(p2.y-p0.y)-(p1.y-p0.y)*(p2 阅读全文

posted @ 2012-09-29 08:43 kuangbin 阅读(3083) 评论(0) 推荐(2)

最大流模板(SAP算法)(邻接表形式)
摘要:最大流的SAP模板,用了很多次了。今天总结贴下(虽然代码不够精简,但是自己写的也总算看起来明白些,不容易错)据说没有可以卡SAP的最大流。。。const int MAXN=20010;//点数的最大值const int MAXM=880010;//边数的最大值const int INF=0x3f3f3f3f;struct Node{ int from,to,next; int cap;}edge[MAXM];int tol;int head[MAXN];int dep[MAXN];int gap[MAXN];//gap[x]=y :说明残留网络中dep[i]==x的个数为yint ... 阅读全文

posted @ 2012-09-29 08:34 kuangbin 阅读(3194) 评论(3) 推荐(0)

POJ 3133 Manhattan Wiring (插头DP)
摘要:Manhattan WiringTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 1110Accepted: 634DescriptionThere is a rectangular area containing n × m cells. Two cells are marked with “2”, and another two with “3”. Some cells are occupied by obstacles. You should connect the two “2”s and also the tw 阅读全文

posted @ 2012-09-28 16:35 kuangbin 阅读(1443) 评论(0) 推荐(0)

ZOJ 3207 80ers' Memory(水题)
摘要:80ers' MemoryTime Limit: 1 Second Memory Limit: 32768 KBI guess most of us are so called 80ers, which means that we were born in the 1980's. This group of people shared a lot of common memories. For example, the Saint Seiya, the YoYo ball, the Super Mario, and so on. Do you still remember th 阅读全文

posted @ 2012-09-27 18:24 kuangbin 阅读(510) 评论(1) 推荐(0)

ZOJ 3204 Connect them (最小生成树,输出字典序最小的解)
摘要:Connect themTime Limit: 1 Second Memory Limit: 32768 KBYou have n computers numbered from 1 to n and you want to connect them to make a small local area network (LAN). All connections are two-way (that is connecting computers i and j is the same as connecting computers j and i). The cost of connect. 阅读全文

posted @ 2012-09-27 16:23 kuangbin 阅读(1544) 评论(1) 推荐(0)

ZOJ 3203 Light Bulb (数学直接推公式 或者 三分法)
摘要:ZOJ Problem Set - 3203Light BulbTime Limit: 1 Second Memory Limit: 32768 KBCompared to wildleopard's wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in his house. Every night, he is wandering in his incommodious house, thinking of how to ea 阅读全文

posted @ 2012-09-27 15:37 kuangbin 阅读(2978) 评论(0) 推荐(0)

HDU 4417 Super Mario 第37届ACM/ICPC 杭州赛区网络赛第1008题 (划分树)
摘要:Super MarioTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 120Accepted Submission(s): 73Problem DescriptionMario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble aga 阅读全文

posted @ 2012-09-23 20:44 kuangbin 阅读(1449) 评论(3) 推荐(0)

HDU 4417 Super Mario 第37届ACM/ICPC 杭州赛区网络赛1008题(树状数组或者线段树)
摘要:Super MarioTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 80Accepted Submission(s): 42Problem DescriptionMario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble agai 阅读全文

posted @ 2012-09-23 19:39 kuangbin 阅读(2051) 评论(8) 推荐(0)

HDU 4419 Colourful Rectangle 第37届ACM/ICPC 杭州赛区网络赛 1010题 (线段树)
摘要:Colourful RectangleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12Accepted Submission(s): 3Problem DescriptionWe use Red, Green and Blue to make new colours. See the picture below:Now give you n rectangles, the colour of them is red or green or 阅读全文

posted @ 2012-09-23 17:14 kuangbin 阅读(1382) 评论(0) 推荐(0)

HDU 3829 Cat VS Dog (二分匹配求最大独立集)
摘要:Cat VS DogTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 125536/65536 K (Java/Others)Total Submission(s): 1770Accepted Submission(s): 600Problem DescriptionThe zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the chil 阅读全文

posted @ 2012-09-23 10:25 kuangbin 阅读(992) 评论(0) 推荐(0)

HDU 2710 Max Factor (水题)
摘要:Max FactorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2238Accepted Submission(s): 684Problem DescriptionTo improve the organization of his farm, Farmer John labels each of his N (1 <= N <= 5,000) cows with a distinct serial number in the 阅读全文

posted @ 2012-09-23 09:25 kuangbin 阅读(1464) 评论(0) 推荐(0)

HDU 4405 Aeroplane chess 第37届ACM/ICPC 金华赛区网络赛(递推求期望)
摘要:Aeroplane chessTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 229Accepted Submission(s): 158Problem DescriptionHzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws 阅读全文

posted @ 2012-09-22 22:48 kuangbin 阅读(987) 评论(0) 推荐(0)

HDU 4407 Sum 第37届ACM/ICPC 金华赛区 第1008题 (容斥原理)
摘要:SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 358Accepted Submission(s): 109Problem DescriptionXXX is puzzled with the question below: 1, 2, 3, ..., n (1<=n<=400000) are placed in a line. There are m (1<=m<=1000) operations of two 阅读全文

posted @ 2012-09-22 22:45 kuangbin 阅读(1689) 评论(0) 推荐(0)

HDU 4408 Minimum Spanning Tree 第37届ACM/ICPC 金华赛区网络赛1009 题 (最小生成树计数)
摘要:Minimum Spanning TreeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 205Accepted Submission(s): 65Problem DescriptionXXX is very interested in algorithm. After learning the Prim algorithm and Kruskal algorithm of minimum spanning tree, XXX finds th 阅读全文

posted @ 2012-09-22 21:20 kuangbin 阅读(2003) 评论(0) 推荐(0)

HDU 4403 A very hard Aoshu problem 第37届ACM/ICPC 金华赛区网络赛1004题
摘要:A very hard Aoshu problemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 137Accepted Submission(s): 100Problem DescriptionAoshu is very popular among primary school students. It is mathematics, but much harder than ordinary mathematics for primary 阅读全文

posted @ 2012-09-22 20:54 kuangbin 阅读(1042) 评论(0) 推荐(0)

POJ 1470 Closest Common Ancestors (LCA入门题)
摘要:Closest Common AncestorsTime Limit: 2000MSMemory Limit: 10000KTotal Submissions: 11659Accepted: 3848DescriptionWrite a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ancestor of u and v in the tree. The closest 阅读全文

posted @ 2012-09-21 19:08 kuangbin 阅读(621) 评论(0) 推荐(0)

POJ 1330 Nearest Common Ancestors (LCA入门题)
摘要:Nearest Common AncestorsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 12478Accepted: 6652DescriptionA rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with an integer from {1, 2,...,16}. Node 8 . 阅读全文

posted @ 2012-09-21 19:07 kuangbin 阅读(1407) 评论(0) 推荐(0)

HDU 3183 A Magic Lamp (双向链表贪心删除 或者是 RMQ取数)
摘要:A Magic LampTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 745Accepted Submission(s): 271Problem DescriptionKiki likes traveling. One day she finds a magic lamp, unfortunately the genie in the lamp is not so kind. Kiki must answer a question, and 阅读全文

posted @ 2012-09-21 12:36 kuangbin 阅读(621) 评论(0) 推荐(0)

HDU 1806 Frequent values(RMQ)
摘要:Frequent valuesTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 778Accepted Submission(s): 259Problem DescriptionYou are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries co 阅读全文

posted @ 2012-09-20 22:18 kuangbin 阅读(1734) 评论(0) 推荐(1)

POJ 1787 Charlie's Change (完全背包,记录路径)
摘要:Charlie's ChangeTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 2215Accepted: 575DescriptionCharlie is a driver of Advanced Cargo Movement, Ltd. Charlie drives a lot and so he often buys coffee at coffee vending machines at motorests. Charlie hates change. That is basically the setup of 阅读全文

posted @ 2012-09-20 19:16 kuangbin 阅读(1632) 评论(2) 推荐(1)

POJ 3181 Dollar Dayz (完全背包)
摘要:Dollar DayzTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2275Accepted: 934DescriptionFarmer John goes to Dollar Days at The Cow Store and discovers an unlimited number of tools on sale. During his first visit, the tools are selling variously for $1, $2, and $3. Farmer John has exactly $5 阅读全文

posted @ 2012-09-20 14:20 kuangbin 阅读(3852) 评论(5) 推荐(1)

POJ 3186 Treats for the Cows (简单DP)
摘要:Treats for the CowsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 3689Accepted: 1844DescriptionFJ has purchased N (1 <= N <= 2000) yummy treats for the cows who get money for giving vast amounts of milk. FJ sells one treat per day and wants to maximize the money he receives over a gi 阅读全文

posted @ 2012-09-20 10:02 kuangbin 阅读(1125) 评论(0) 推荐(0)

POJ 2392 Space Elevator (多重背包)
摘要:Space ElevatorTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6422Accepted: 2965DescriptionThe cows are going to space! They plan to achieve orbit by building a sort of space elevator: a giant tower of blocks. They have K (1 <= K <= 400) different types of blocks with which to build t 阅读全文

posted @ 2012-09-20 09:27 kuangbin 阅读(1577) 评论(0) 推荐(0)

HDU 4291 A Short problem 第37届ACM/ICPC 成都赛区网络赛1004题 (找规律,取模求循环节)
摘要:A Short problemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 344Accepted Submission(s): 131Problem Description According to a research, VIM users tend to have shorter fingers, compared with Emacs users. Hence they prefer problems short, too. He.. 阅读全文

posted @ 2012-09-17 15:48 kuangbin 阅读(1621) 评论(0) 推荐(0)

HDU 4289 Control 第37届ACM/ICPC 成都赛区网络赛1002题 (最大流)
摘要:ControlTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 238Accepted Submission(s): 135Problem Description You, the head of Department of Security, recently received a top-secret information that a group of terrorists is planning to transport some W. 阅读全文

posted @ 2012-09-17 13:01 kuangbin 阅读(808) 评论(0) 推荐(0)

HDU 4296 Buildings 第37届ACM/ICPC 成都赛区网络赛1009题 (贪心)
摘要:BuildingsTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 155Accepted Submission(s): 72Problem Description Have you ever heard the story of Blue.Mary, the great civil engineer? Unlike Mr. Wolowitz, Dr. Blue.Mary has accomplished many great projects. 阅读全文

posted @ 2012-09-16 19:36 kuangbin 阅读(858) 评论(0) 推荐(0)

HDU 4292 Food 第37届ACM/ICPC 成都赛区网络赛1005题 (最大流)
摘要:FoodTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 76Accepted Submission(s): 47Problem Description You, a part-time dining service worker in your college’s dining hall, are now confused with a new problem: serve as many people as possible. The i.. 阅读全文

posted @ 2012-09-16 19:34 kuangbin 阅读(1146) 评论(0) 推荐(0)

HDU 4288 Coder 第37届ACM/ICPC 成都赛区网络赛1001题 (线段树)
摘要:CoderTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 120Accepted Submission(s): 52Problem Description In mathematics and computer science, an algorithm describes a set of procedures or instructions that define a procedure. The term has become in. 阅读全文

posted @ 2012-09-16 19:29 kuangbin 阅读(1323) 评论(0) 推荐(0)

POJ 3264 Balanced Lineup(RMQ)
摘要:Balanced LineupTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 24349Accepted: 11348Case Time Limit: 2000MSDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with som 阅读全文

posted @ 2012-09-16 09:34 kuangbin 阅读(1117) 评论(0) 推荐(0)

POJ 1276 Cash Machine(多重背包)
摘要:Cash MachineTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 20470Accepted: 7162DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N distinct bill denominations, say Dk, k= 阅读全文

posted @ 2012-09-15 17:06 kuangbin 阅读(508) 评论(0) 推荐(0)

HDU 1059 Dividing(多重背包)
摘要:DividingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9749Accepted Submission(s): 2703Problem DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the ma 阅读全文

posted @ 2012-09-15 16:34 kuangbin 阅读(495) 评论(0) 推荐(0)

HDU 1114 Piggy-Bank (完全背包)
摘要:Piggy-BankTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5726Accepted Submission(s): 2878Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes f 阅读全文

posted @ 2012-09-15 16:13 kuangbin 阅读(2685) 评论(0) 推荐(0)

HDU 3466 Proud Merchants (需要排序的01背包)
摘要:Proud MerchantsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1291Accepted Submission(s): 532Problem DescriptionRecently, iSea went to an ancient country. For such a long time, it was the most wealthy and powerful kingdom in the world. As a resul 阅读全文

posted @ 2012-09-14 22:58 kuangbin 阅读(1914) 评论(1) 推荐(1)

POJ 2923 Relocation (状态压缩+DP)
摘要:RelocationTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1106Accepted: 447DescriptionEmma and Eric are moving to their new house they bought after returning from their honeymoon. Fortunately, they have a few friends helping them relocate. To move the furniture, they only have two compact c 阅读全文

posted @ 2012-09-14 18:53 kuangbin 阅读(1781) 评论(0) 推荐(0)

HDU 2639 Bone Collector II (01背包求第K大解)
摘要:Bone Collector IITime Limit: 5000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 916Accepted Submission(s): 437Problem DescriptionThe title of this problem is familiar,isn't it?yeah,if you had took part in the "Rookie Cup" competition,you must have s 阅读全文

posted @ 2012-09-14 15:51 kuangbin 阅读(583) 评论(0) 推荐(0)

POJ 2184 Cow Exhibition(01背包)
摘要:Cow ExhibitionTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6899Accepted: 2437Description"Fat and docile, big and dumb, they look so stupid, they aren't much fun..." - Cows with Guns by Dana Lyons The cows want to prove to the public that they are both smart and fun. In orde 阅读全文

posted @ 2012-09-14 14:48 kuangbin 阅读(2606) 评论(0) 推荐(3)

HDU 2955 Robberies (01背包)
摘要:RobberiesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5181Accepted Submission(s): 1958Problem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because the 阅读全文

posted @ 2012-09-14 10:20 kuangbin 阅读(469) 评论(0) 推荐(0)

HDU 2546 饭卡 (01背包)
摘要:饭卡Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4349Accepted Submission(s): 1489Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡 阅读全文

posted @ 2012-09-13 22:49 kuangbin 阅读(627) 评论(0) 推荐(0)

POJ 3624 Charm Bracelet (01背包)
摘要:Charm Bracelet Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13977 Accepted: 6381 Description Bessie has gone to the mall's jewelry store 阅读全文

posted @ 2012-09-13 22:21 kuangbin 阅读(527) 评论(0) 推荐(0)

POJ 3862 Asteroids (三维凸包,求两个凸包重心到表面的最短距离)
摘要:AsteroidsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 297Accepted: 65Special JudgeDescriptionAssociation of Collision Management (ACM) is planning to perform the controlled collision of two asteroids. The asteroids will be slowly brought together and collided at negligible speed. ACM exp 阅读全文

posted @ 2012-09-12 23:14 kuangbin 阅读(1338) 评论(3) 推荐(0)

POJ 3528 Ultimate Weapon (三维凸包,求三维凸包表面积)
摘要:Ultimate WeaponTime Limit: 2000MSMemory Limit: 131072KTotal Submissions: 1441Accepted: 713DescriptionIn year 2008 of the Cosmic Calendar, the Aliens send a huge armada towards the Earth seeking after conquest. The humans now depend on their ultimate weapon to retain their last hope of survival. The 阅读全文

posted @ 2012-09-12 22:55 kuangbin 阅读(605) 评论(0) 推荐(0)

HDU 3662 3D Convex Hull (三维凸包,求凸包多边形个数)
摘要:3D Convex HullTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 592Accepted Submission(s): 328Problem DescriptionThere are N points in 3D-space which make up a 3D-Convex hull*. How many faces does the 3D-convexhull have? It is guaranteed that all the 阅读全文

posted @ 2012-09-12 22:45 kuangbin 阅读(1281) 评论(0) 推荐(0)

HDU 4273 Rescue 第37届ACM/ICPC 长春赛区网络赛1007题(三维凸包+重心+点面距离)
摘要:RescueTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 97Accepted Submission(s): 65Problem DescriptionI work at NASA outer space rescue team which needs much courage and patient. In daily life, I always receive a lot of mission, and I must complete 阅读全文

posted @ 2012-09-12 22:40 kuangbin 阅读(986) 评论(0) 推荐(0)

HDU 4283 You Are the One 第37届ACM/ICPC 天津赛区网络赛 1006题 (DP)
摘要:You Are the OneTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 402Accepted Submission(s): 221Problem Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show. 阅读全文

posted @ 2012-09-12 09:19 kuangbin 阅读(931) 评论(0) 推荐(0)

HDU 4280 Island Transport 第37届ACM/ICPC 天津网络赛1003题 (最大流模板题,高效SAP模板)
摘要:Island TransportTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1296Accepted Submission(s): 421Problem Description In the vast waters far far away, there are many islands. People are living on the islands, and all the transport among the islands. 阅读全文

posted @ 2012-09-11 23:29 kuangbin 阅读(1400) 评论(0) 推荐(0)

POJ 1459 Power Network 最大流 dinic模板
摘要:Power NetworkTime Limit: 2000MSMemory Limit: 32768KTotal Submissions: 18609Accepted: 9833DescriptionA power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amount 0 阅读全文

posted @ 2012-09-11 22:22 kuangbin 阅读(2239) 评论(0) 推荐(0)

HDU 4284 Travel 第37届ACM/ICPC 天津赛区网络赛1007题 (状态压缩DP)
摘要:TravelTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1380Accepted Submission(s): 433Problem Description PP loves travel. Her dream is to travel around country A which consists of N cities and M roads connecting them. PP has measured the money ea. 阅读全文

posted @ 2012-09-11 20:57 kuangbin 阅读(446) 评论(0) 推荐(0)

HDU 4286 Data Handler 第37届ACM/ICPC 天津赛区网络赛1009题 (双向链表模拟)
摘要:Data HandlerTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 689Accepted Submission(s): 159Problem Description You are in charge of data in a company, so you are called "Data Handler". Different from the data in computer, the data you ha 阅读全文

posted @ 2012-09-11 19:07 kuangbin 阅读(599) 评论(1) 推荐(0)

HDU 4276 The Ghost Blows Light 第37届ACM/ICPC长春赛区1010题 (树形DP)
摘要:The Ghost Blows LightTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 590Accepted Submission(s): 194Problem DescriptionMy name is Hu Bayi, robing an ancient tomb in Tibet. The tomb consists of N rooms (numbered from 1 to N) which are connected by so 阅读全文

posted @ 2012-09-11 11:13 kuangbin 阅读(752) 评论(0) 推荐(0)

HDU 4272 LianLianKan 第37届ACM/ICPC 长春赛区网络赛1006题 (搜索)
摘要:LianLianKanTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 840Accepted Submission(s): 280Problem DescriptionI like playing game with my friend, although sometimes looks pretty naive. Today I invent a new game called LianLianKan. The game is about p 阅读全文

posted @ 2012-09-11 09:45 kuangbin 阅读(1844) 评论(2) 推荐(0)

POJ 2246 ZOJ 1094 Matrix Chain Multiplication(简单题)
摘要:Matrix Chain MultiplicationTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1678Accepted: 1080DescriptionSuppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is 阅读全文

posted @ 2012-09-10 20:57 kuangbin 阅读(528) 评论(0) 推荐(0)

HDU 4268 Alice and Bob 第37届ACM/ICPC长春赛区网络赛1002题 (贪心+multiset)
摘要:Alice and BobTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 627Accepted Submission(s): 245Problem DescriptionAlice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular cards resp 阅读全文

posted @ 2012-09-10 19:45 kuangbin 阅读(804) 评论(0) 推荐(0)

HDU 4267 A Simple Problem with Integers 第37届ACM/ICPC长春赛区网络赛1001题 (树状数组)
摘要:A Simple Problem with IntegersTime Limit: 5000/1500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 659Accepted Submission(s): 253Problem DescriptionLet A1, A2, ... , AN be N elements. You need to deal with two kinds of operations. One type of operation is to add a give 阅读全文

posted @ 2012-09-10 17:15 kuangbin 阅读(1304) 评论(0) 推荐(0)

HDU 4277 USACO ORZ 第37届ACM/ICPC长春赛区网络赛1011题(搜索)
摘要:USACO ORZTime Limit: 5000/1500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1099Accepted Submission(s): 398Problem DescriptionLike everyone, cows enjoy variety. Their current fancy is new shapes for pastures. The old rectangular shapes are out of favor; new geometrie 阅读全文

posted @ 2012-09-10 17:12 kuangbin 阅读(569) 评论(0) 推荐(0)

HDU 4282 A very hard mathematic problem 第37届ACM/ICPC长春赛区网络赛1005题 (暴力)
摘要:A very hard mathematic problemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 964Accepted Submission(s): 279Problem Description Haoren is very good at solving mathematic problems. Today he is working a problem like this: Find three positive inte... 阅读全文

posted @ 2012-09-10 17:04 kuangbin 阅读(938) 评论(0) 推荐(0)

HDU 4287 Intelligent IME 第37届ACM/ICPC天津赛区网络赛1010题 (水题)
摘要:Intelligent IMETime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 399Accepted Submission(s): 207Problem Description We all use cell phone today. And we must be familiar with the intelligent English input method on the cell phone. To be specific, the . 阅读全文

posted @ 2012-09-10 15:46 kuangbin 阅读(920) 评论(0) 推荐(0)

HDU 4279 Number 第37届ACM/ICPC天津赛区网络赛1002题 (简单规律题)
摘要:NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 640Accepted Submission(s): 207Problem Description Here are two numbers A and B (0 < A <= B). If B cannot be divisible by A, and A and B are not co-prime numbers, we define A as a special n 阅读全文

posted @ 2012-09-10 15:36 kuangbin 阅读(770) 评论(0) 推荐(0)

HDU 4278 Faulty Odometer 第37届ACM/ICPC天津赛区网络赛1001题 (简单水题)
摘要:Faulty OdometerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 312Accepted Submission(s): 228Problem Description You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from the. 阅读全文

posted @ 2012-09-10 15:11 kuangbin 阅读(1483) 评论(0) 推荐(0)

HDU 4099 Revenge of Fibonacci(字典树)
摘要:Revenge of FibonacciTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 204800/204800 K (Java/Others)Total Submission(s): 914Accepted Submission(s): 197Problem DescriptionThe well-known Fibonacci sequence is defined as following:Here we regard n as the index of the Fibonacci number F(n).This sequen 阅读全文

posted @ 2012-09-06 17:36 kuangbin 阅读(2180) 评论(1) 推荐(0)

HDU 3501 Calculation 2(欧拉函数的引申)
摘要:Calculation 2Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1264Accepted Submission(s): 530Problem DescriptionGiven a positive integer N, your task is to calculate the sum of the positive integers less than N which are not coprime to N. A is said 阅读全文

posted @ 2012-09-06 16:38 kuangbin 阅读(399) 评论(0) 推荐(0)

HDU 2802 F(N)(简单题,找循环解)
摘要:F(N)Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2037Accepted Submission(s): 677Problem DescriptionGiving the N, can you tell me the answer of F(N)?InputEach test case contains a single integer N(1<=N<=10^9). The input is terminated by a s 阅读全文

posted @ 2012-09-06 15:20 kuangbin 阅读(1126) 评论(0) 推荐(0)

HDU 4221 Greedy?(贪心)
摘要:Greedy?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 908Accepted Submission(s): 284Problem DescriptioniSea is going to be CRAZY! Recently, he was assigned a lot of works to do, so many that you can't imagine. Each task costs Ci time as least, 阅读全文

posted @ 2012-09-05 23:30 kuangbin 阅读(1195) 评论(0) 推荐(0)

POJ 3128 Leonardo's Notebook(置换)
摘要:Leonardo's NotebookTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1514Accepted: 645Description— I just bought Leonardo's secret notebook! Rare object collector Stan Ucker was really agitated but his friend, special investigator Sarah Kepticwas unimpressed. — How do you know it is g 阅读全文

posted @ 2012-09-04 16:18 kuangbin 阅读(721) 评论(0) 推荐(0)

POJ 1721 CARDS(置换)
摘要:CARDSTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 1033Accepted: 544DescriptionAlice and Bob have a set of N cards labelled with numbers 1 ... N (so that no two cards have the same label) and a shuffle machine. We assume that N is an odd integer. The shuffle machine accepts the set of car 阅读全文

posted @ 2012-09-04 15:46 kuangbin 阅读(681) 评论(0) 推荐(0)

POJ 1026 Cipher(置换)
摘要:CipherTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 16995Accepted: 4445DescriptionBob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a Public Key Cryptosystem, but their encoding and decoding is based on secret keys. They chose the secret key at their last me 阅读全文

posted @ 2012-09-03 22:05 kuangbin 阅读(1446) 评论(0) 推荐(0)

POJ 3270 Cow Sorting(置换)
摘要:Cow SortingTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 4753Accepted: 1734DescriptionFarmer John's N (1 ≤ N ≤ 10,000) cows are lined up to be milked in the evening. Each cow has a unique "grumpiness" level in the range 1...100,000. Since grumpy cows are more likely to damag 阅读全文

posted @ 2012-09-03 16:28 kuangbin 阅读(1813) 评论(0) 推荐(0)

HDU 4122 Alice's mooncake shop(RMQ,或者单调队列)
摘要:Alice's mooncake shopTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1183Accepted Submission(s): 273Problem DescriptionThe Mid-Autumn Festival, also known as the Moon Festival or Zhongqiu Festival is a popular harvest festival celebrated by Chi 阅读全文

posted @ 2012-09-02 22:43 kuangbin 阅读(955) 评论(0) 推荐(0)

HDU 3400 Line belt (三分法)
摘要:Line beltTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1820Accepted Submission(s): 683Problem DescriptionIn a two-dimensional plane there are two line belts, there are two segments AB and CD, lxhgww's speed on AB is P and on CD is Q, he can m 阅读全文

posted @ 2012-09-02 09:41 kuangbin 阅读(1488) 评论(0) 推荐(0)

高斯消元法(模板)
摘要:#include<stdio.h>#include<algorithm>#include<iostream>#include<string.h>#include<math.h>using namespace std;const int MAXN=50;int a[MAXN][MAXN];//增广矩阵int x[MAXN];//解集bool free_x[MAXN];//标记是否是不确定的变元/*void Debug(void){ int i, j; for (i = 0; i < equ; i++) { for (j = 0; 阅读全文

posted @ 2012-09-01 20:59 kuangbin 阅读(17766) 评论(7) 推荐(2)

POJ 2065 SETI(高斯消元)
摘要:SETITime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 1148Accepted: 691DescriptionFor some years, quite a lot of work has been put into listening to electromagnetic radio signals received from space, in order to understand what civilizations in distant galaxies might be trying to tell us. One 阅读全文

posted @ 2012-09-01 13:12 kuangbin 阅读(1087) 评论(0) 推荐(0)

导航

JAVASCRIPT: