POJ1149 最大流经典建图PIG】的更多相关文章

题意:       有一个人,他有m个猪圈,每个猪圈里都有一定数量的猪,但是他没有钥匙,然后依次来了n个顾客,每个顾客都有一些钥匙,还有他要卖猪的数量,每个顾客来的时候主人用顾客的钥匙打开相应的门,可以调整猪的数量,然后卖给一些猪给这个顾客(卖多少自己决定),顾客走之后所有的们就都锁上了,问主人最多能买多少头猪. 思路:       经典的建图,这已经是我第三次做这个题目了,大一,大二,大三每年做流的时候都会想到它,然后回来做一次,没办法,感觉比较经典,虽然现在做着直接1A没有第一次做的时候千辛…
PIGS Time Limit: 1000MS   Memory Limit: 10000KB   64bit IO Format: %I64d & %I64u Submit Status Description Mirko 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…
PIGS Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 18727   Accepted: 8508 Description Mirko 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 t…
Battle ships Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1061    Accepted Submission(s): 377 Problem Description Dear contestant, now you are an excellent navy commander, who is responsible…
这道逼题!感受到了数学对我的深深恶意(#‵′).... 1822: [JSOI2010]Frozen Nova 冷冻波 Time Limit: 10 Sec Memory Limit: 64 MB Submit: 1282 Solved: 382 [Submit][Status][Discuss] Description WJJ喜欢"魔兽争霸"这个游戏.在游戏中,巫妖是一种强大的英雄,它的技能Frozen Nova每次可以杀死一个小精灵.我们认为,巫妖和小精灵都可以看成是平面上的点.…
题意:n个顾客依次来买猪,有n个猪房,每个顾客每次可以开若干个房子,买完时,店主可以调整这位顾客 开的猪房里的猪,共m个猪房,每个猪房有若干猪,求最多能卖多少猪. 构图思想:顾客有先后,每个人想要的猪数量已经确定,显然要建汇点t,每个顾客连线t(以顾客为结点),权值为他想要买 的猪数量(最多想要的都卖了,最大流之归宿,必思汇点!)然后,你想,每个顾客有先后顺序,前一个顾客开过的 房子取的猪数量可以重新分配,必然要连后一个开这个房子的顾客连线(权为inf)(相当于前面一个先取该流量,后面的再取,重…
2879: [Noi2012]美食节 Time Limit: 10 Sec  Memory Limit: 512 MBSubmit: 1366  Solved: 737[Submit][Status][Discuss] Description CZ市为了欢迎全国各地的同学,特地举办了一场盛大的美食节.作为一个喜欢尝鲜的美食客,小M自然不愿意错过这场盛宴.他很快就尝遍了美食节所有的美食.然而,尝鲜的欲望是难以满足的.尽管所有的菜品都很可口,厨师做菜的速度也很快,小M仍然觉得自己桌上没有已经摆在别人…
网络流练习ing.. 1433: [ZJOI2009]假期的宿舍 Time Limit: 10 Sec Memory Limit: 162 MB Submit: 1748 Solved: 765 [Submit][Status][Discuss] Description Input Output Sample Input 1 3 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 **Sample Outpu**t ˆ-ˆ HINT 对于30% 的数据满足1 ≤ n ≤ 12. 对于10…
Missile Time Limit: 2 Seconds      Memory Limit: 65536 KB You control N missile launching towers. Every tower has enough missiles, but for each tower only one missile can be launch at the same time. Before the launching, every missile need T1 seconds…
Problem Description Thanks to a certain "green" resources company, there is a new profitable industry of oil skimming. There are large slicks of crude oil floating in the Gulf of Mexico just waiting to be scooped up by enterprising oil barons. O…