Problem 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 the rookies steps on an innocent-looking stone and the room's floor suddenly d…
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…
题意:有N*M的矩形,每个格点有一个柱子,每根柱子有高度c,允许蜥蜴经过这根柱子c次,开始有一些蜥蜴在某些柱子上,它们要跳出这个矩形,每步最大能跳d个单位,求最少有多少蜥蜴不能跳出这个矩形. 分析:转化为求最多有多少蜥蜴能跳出,则变为最大流问题.经典的建图思路,将每个柱子视作点,将其拆为入点和出点,入点到出点建一条容量为c的边,若一个点距离距离边界小于d,建边. #include<bits/stdc++.h> using namespace std; typedef long long LL;…
题目链接:https://vjudge.net/problem/HDU-2732 Leapin' Lizards Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3231 Accepted Submission(s): 1326 Problem Description Your platoon of wandering lizard…
贪心+网络流.对于每个结点,构建入点和出点.对于每一个lizard>0,构建边s->in position of lizard, 容量为1.对于pillar>0, 构建边in position of pillar -> out position of pillar, 容量为number of pillar.若沿四个方向移动距离d可以超过边界,则构建边out position of pillar -> t, 容量为INF:否则, 对于曼哈顿距离l(l>0 and l<…
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 the rookies steps on an innocent-looking stone and the room's floor suddenly disappears! Each liza…
Leapin' Lizards Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2080 Accepted Submission(s): 857 Problem Description Your platoon of wandering lizards has entered a strange room in the labyri…
Leapin' Lizards http://acm.hdu.edu.cn/showproblem.php?pid=2732 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4180 Accepted Submission(s): 1670 Problem Description Your platoon of wandering…
Leapin' Lizards Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4250 Accepted Submission(s): 1705 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2732 Description: Your platoon of wandering li…
D - Leapin' Lizards Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description Your platoon of wandering lizards has entered a strange room in the labyrinth you are exploring. As you are looking around for hidden treas…
Leapin' Lizards Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1268 Accepted Submission(s): 530 Problem Description Your platoon of wandering lizards has entered a strange room in the labyri…
题目链接:http://poj.org/problem?id=2711 题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1066 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 the…
比较形象的是地图每个点都拆成三个点,这三个点限制流量为0或1,于是再一分为二,这样每个点都被拆成6个点... 其实拆两个点,连容量为柱子高的边,这样就行了.. 这题我掉坑了,“1 lizard was left behind.”..虽然样例都把一切都说了..要注意细节.. #include<cstdio> #include<cstring> #include<queue> #include<algorithm> using namespace std; #d…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4240 A city is made up exclusively of one-way steets.each street in the city has a capacity,which is the minimum of the capcities of the streets along that route. The redundancy ratio from point A to poi…