自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 hdu2141 (二分)

Problem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+C

2016-11-29 21:02:51 357

原创 poj 2528 Mayor's posters(线段树+离散化)

DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city counci

2016-11-13 17:35:52 299

原创 poj 3468 A Simple Problem with Integers(线段树+延迟标记)

DescriptionYou 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

2016-11-13 15:52:42 234

原创 poj 2886 Who Gets the Most Candies?(线段树)

DescriptionN children are sitting in a circle to play a game.The children are numbered from 1 to N in clockwise order. Each of them has a card with a non-zero integer on it in his/her hand. The

2016-11-11 12:01:21 266

原创 hdu 3564 Another LIS(线段树+lis)

Problem DescriptionThere is a sequence firstly empty. We begin to add number from 1 to N to the sequence, and every time we just add a single number to the sequence at a specific position. Now, we w

2016-11-11 11:01:55 259

原创 hdu 3549 Flow Problem(最大流 EK,sap)

Problem 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 directed graph.InputThe first line of in

2016-11-09 10:20:54 282

原创 hdu 4504 威威猫系列故事——篮球梦 (递推)

Problem Description  威威猫十分迷恋篮球比赛,是忠实的NBA球迷,他常常幻想自己那肥硕的身躯也能飞起扣篮。另外,他对篮球教练工作也情有独钟,特别是对比赛的战术,投篮选择方面也是很有研究,下面就是威威猫研究过的一个问题:  一场NBA篮球比赛总共48分钟,假如我们现在已经知道当前比分 A:B,A代表我方的比分,B代表对方的比分,现在比赛还剩下t秒时间。我们简单的认为双方各

2016-11-06 14:58:46 571

原创 hdu 4502 (吉哥系列故事——临时工计划)(贪心+背包)

Problem Description  俗话说一分钱难倒英雄汉,高中几年下来,吉哥已经深深明白了这个道理,因此,新年开始存储一年的个人资金已经成了习惯,不过自从大学之后他不好意思再向大人要压岁钱了,只能把唯一的希望放到自己身上。可是由于时间段的特殊性和自己能力的因素,只能找到些零零碎碎的工作,吉哥想知道怎么安排自己的假期才能获得最多的工资。  已知吉哥一共有m天的假期,每天的编号从1到m

2016-11-05 21:40:14 469

原创 hdu 4501 (小明系列故事——买年货) (多维背包)

Problem Description  春节将至,小明要去超市购置年货,于是小明去了自己经常去的都尚超市。  刚到超市,小明就发现超市门口聚集一堆人。用白云女士的话说就是:“那家伙,那场面,真是人山人海,锣鼓喧天,鞭炮齐呤,红旗招展。那可真是相当的壮观啊!”。好奇的小明走过去,奋力挤过人群,发现超市门口贴了一张通知,内容如下:    值此新春佳节来临之际,为了回馈广大顾客的支持和

2016-11-05 20:51:14 307

原创 hdu 4500 (小Q系列故事——屌丝的逆袭)

水题,读题要仔细。。。#include#include#includeusing namespace std;const int N=25;const int minn=-99999999;int map[N][N],dp[N][N];int main(){ int n,m; while(~scanf("%d%d",&n,&m)) {

2016-11-04 17:20:49 475

原创 Poj 1273 最后的晚餐(EK算法)

题意:现在有m个池塘(从1到m开始编号,1为源点,m为汇点),及n条水渠,给出这n条水渠所连接的点和所能流过的最大流量;思路:最大流EK算法,注意有重边;代码:#include#include#include#includeusing namespace std;const int N=205;const int maxn=0xfffffff;int map[N][N],

2016-11-04 15:02:12 306

转载 最大流之EK算法

原创路径:http://www.wutianqi.com/?p=3107Edmond Karp算法的大概思想:反复寻找源点s到汇点t之间的增广路径,若有,找出增广路径上每一段[容量-流量]的最小值delta,若无,则结束。在寻找增广路径时,可以用BFS来找,并且更新残留网络的值(涉及到反向边)。而找到delta后,则使最大流值加上delta,更新为当前的最大流值

2016-11-04 14:56:17 374

原创 poj 2182 Lost Cows (单点线段树)

DescriptionN (2 <= N <= 8,000) cows have unique brands in the range 1..N. In a spectacular display of poor judgment, they visited the neighborhood 'watering hole' and drank a few too many beers be

2016-11-01 20:31:09 171

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除