Dining Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 24945 Accepted: 10985 Description Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others. Farmer John has cooked fabul…
很普通的拆点网络流,把每个柱子拆成两个点(i,j,0)和(i,j,1).对于柱子的高度限制则加边((i,j,0),(i,j,1),height). 两个柱子能互相到达则加边((i,j,1),(i1,j1,0),INF). 能到达边界的柱子加边((i,j,1),t,INF).有蜥蜴的柱子加边(s,(i,j,0),1). 跑一遍最大流,答案就是总蜥蜴数-最大流. # include <cstdio> # include <cstring> # include <cstdlib&g…
Power Network Time Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u Submit Status Description A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supp…
POJ 2711 Leapin' Lizards / HDU 2732 Leapin' Lizards / BZOJ 1066 [SCOI2007]蜥蜴(网络流,最大流) Description Your platoon of wandering lizards has entered a strange room in the labyrinth you are exploring. As you are looking around for hidden treasures, one of…