上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页

2014年3月16日

codeforces -- 283A

摘要: A. Cows and Sequencetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBessie and the cows are playing with sequences and need your help. They start with a sequence, initially containing just the number 0, and performnoperations. Each operation is o 阅读全文

posted @ 2014-03-16 17:01 ~Love() 阅读(327) 评论(0) 推荐(0)

HDU -- 4496

摘要: D-CityTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 840Accepted Submission(s): 340Problem DescriptionLuxer is a really bad guy. He destroys everything he met.One day Luxer went to D-city. D-city has N D-points and M D-lines. Each D-line connects 阅读全文

posted @ 2014-03-16 16:57 ~Love() 阅读(230) 评论(0) 推荐(0)

2014年3月12日

POJ -- 2823

摘要: Sliding WindowTime Limit:12000MSMemory Limit:65536KTotal Submissions:35408Accepted:10476Case Time Limit:5000MSDescriptionAn array of sizen≤ 106is given to you. There is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can only see theknumbers in the win 阅读全文

posted @ 2014-03-12 21:05 ~Love() 阅读(182) 评论(0) 推荐(0)

HDU --- 4006

摘要: The kth great numberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 6014Accepted Submission(s): 2434Problem DescriptionXiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, or ask Xiao Bao 阅读全文

posted @ 2014-03-12 21:01 ~Love() 阅读(217) 评论(0) 推荐(0)

2014年3月10日

codeforce ---A. Milking cows

摘要: A. Milking cowstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub helps his grandfather at the farm. Today he must milk the cows. There arencows sitting in a row, numbered from1tonfrom left to right. Each cow is either facing to the left or fac 阅读全文

posted @ 2014-03-10 17:17 ~Love() 阅读(435) 评论(0) 推荐(0)

2014年3月7日

POJ -- 1273 Drainage Ditches

摘要: Drainage DitchesTime Limit:1000MSMemory Limit:10000KTotal Submissions:52402Accepted:19946DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite... 阅读全文

posted @ 2014-03-07 10:48 ~Love() 阅读(199) 评论(0) 推荐(0)

2014年3月6日

HDU --3549

摘要: Flow ProblemTime Limit: 5000/5000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 6336Accepted Submission(s): 2943Problem DescriptionNetwork flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted dire 阅读全文

posted @ 2014-03-06 19:49 ~Love() 阅读(212) 评论(0) 推荐(0)

2014年3月5日

最大流算法---Edmond-Karp

摘要: 这个算法是基于FF方法,就是通过不断求残余网络的增广路来增广流量,直到找不到增广路为止。注意:每次找到增广路以后都要更新原网络。EK算法通过BFS寻找源S到汇T的一条最短路径,因此时间复杂度是O(VE^2).模板代码如下: 1 #include 2 #include 3 #include 4 #include 5 #define MAX 1000 6 using namespace std; 7 int res[MAX][MAX]; 8 int vis[MAX], pre[MAX]; 9 queueq;10 int n;11 bool bfs(int s, int t)12 {13 i... 阅读全文

posted @ 2014-03-05 21:15 ~Love() 阅读(321) 评论(0) 推荐(0)

2014年3月4日

HDU --2665

摘要: Kth numberTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4349Accepted Submission(s): 1381Problem DescriptionGive you a sequence and ask you the kth big number of a inteval.InputThe first line is the number of the test cases.For each test case, th 阅读全文

posted @ 2014-03-04 18:21 ~Love() 阅读(197) 评论(0) 推荐(0)

POJ --2104

摘要: K-th NumberTime Limit:20000MSMemory Limit:65536KTotal Submissions:34935Accepted:11134Case Time Limit:2000MSDescriptionYou are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be a 阅读全文

posted @ 2014-03-04 18:19 ~Love() 阅读(181) 评论(0) 推荐(0)

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页

导航