March of the Penguins Time Limit: 8000MS Memory Limit: 65536K Total Submissions: 4809 Accepted: 2195 Description Somewhere near the south pole, a number of penguins are standing on a number of ice floes. Being social animals, the penguins would l…
March of the Penguins Time Limit: 8000MS Memory Limit: 65536K Total Submissions: 4873 Accepted: 2220 Description Somewhere near the south pole, a number of penguins are standing on a number of ice floes. Being social animals, the penguins would l…
题目链接:http://poj.org/problem?id=3281 题目大意:农夫为他的 N (1 ≤ N ≤ 100) 牛准备了 F (1 ≤ F ≤ 100)种食物和 D (1 ≤ D ≤ 100) 种饮料.每头牛都有各自喜欢的食物和饮料,而每种食物或饮料只能分配给一头牛.最多能有多少头牛可以同时得到喜欢的食物和饮料? 解题思路:令st=0为源点,en=f+2*n+1为汇点,st向每种食物建流量为1的边,每种食物向喜欢它的牛(拆点1)建流量为1的边,眉头牛的拆点之间建流量为1的边,每头牛…
Description Somewhere near the south pole, a number of penguins are standing on a number of ice floes. Being social animals, the penguins would like to get together, all on the same floe. The penguins do not want to get wet, so they have use their li…