题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3046 In ZJNU, there is a well-known prairie. And it attracts pleasant sheep and his companions to have a holiday. Big big wolf and his families know about this, and quietly hid in the big lawn. As ZJNU A…
HDU 3046 Pleasant sheep and big big wolf 题目链接 题意:一个n * m平面上,1是羊.2是狼,问最少要多少围墙才干把狼所有围住,每有到达羊的路径 思路:有羊和狼.要分成两个集合互不可达.显然的最小割.建图源点连狼,容量无穷,羊连汇点,容量无穷.然后相邻格子连边.容量为1 代码: #include <cstdio> #include <cstring> #include <queue> #include <algorithm…
Pleasant sheep and big big wolf Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on HDU. Original ID: 304664-bit integer IO format: %I64d Java class name: Main In ZJNU, there is a well-known prairie. And it attracts pleas…
Pleasant sheep and big big wolf Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3316 Accepted Submission(s): 1360 Problem Description In ZJNU, there is a well-known prairie. And it attracts p…