当前位置:网站首页>Poj2594 treasure exploration [bipartite graph minimum path coverage] [Floyd]
Poj2594 treasure exploration [bipartite graph minimum path coverage] [Floyd]
2022-07-27 12:50:00 【51CTO】
Topic link :
http://poj.org/problem?id=2594
The main idea of the topic :
Here you are. N Locations ,M The strip has a directed edge , A graph of known composition is a directed acyclic graph . Now let the robot pass on the site M
Edge to traverse N Locations , ask : At least how many robots are needed to traverse N Locations .
Ideas :
This is a problem of finding the minimum path coverage . What is different from the problem of general minimum path coverage is : The points here are
To iterate . That is, two or more robots can pass through the same point . that , First establish a bipartite graph ,
On both sides N Locations . Then based on the original drawing , use Floyd Find a transitive closure , That is, if you point i It can reach
spot j, And point j Can reach the point k, Then it can be regarded as a point i You can skip the point directly j And the point of arrival k, You can establish a directed
edge (i,k). After building the map , Is the general bipartite graph minimum path coverage problem . And bipartite graph minimum path coverage =
points - Maximum matching of bipartite graph , Use Hungarian algorithm to find the maximum match of bipartite graph .
AC Code :
边栏推荐
- Isolation level
- 概述有名内部类与匿名内部类
- What are metauniverse and NFT digital collections?
- Play CSDN editor
- js日期时间格式化(年月日、时分秒、星期、季度、获取时间差、日期与时间戳转换的功能)
- HDU1698_ Just a Hook
- Vi. analysis of makefile.build
- Will MySQL fail to insert data? Why?
- Detail throw and throws
- 2022 global Vocational Education Industry Development Report
猜你喜欢

Specify the add method of HashSet

BSP视频教程第21期:轻松一键实现串口DMA不定长收发,支持裸机和RTOS,含MDK和IAR两种玩法,比STM32CubeMX还方便(2022-07-24)

视频游戏沉迷行为研究综述

开源项目丨Taier1.2版本发布,新增工作流、租户绑定简化等多项功能

Laboratory procedures and references of chloramphenicol acetate

C program debugging and exception handling (try catch)

程序员培训学习后好找工作吗

500强企业如何提升研发效能?来看看行业专家怎么说!

详述try-catch-finally

Openpyxl drawing radar map
随机推荐
BSP视频教程第21期:轻松一键实现串口DMA不定长收发,支持裸机和RTOS,含MDK和IAR两种玩法,比STM32CubeMX还方便(2022-07-24)
HDU1698_ Just a Hook
Lambda expression
Map接口
时间工具类,得到当前时间,date转string
How to use the server to build our blog
JVM memory layout detailed, illustrated, well written!
关于2022年3月9日之后Typora登录不了--已解决
湖仓一体电商项目背景与架构介绍及基础环境准备
爱可可AI前沿推介(7.27)
Detail throw and throws
Lambda 表达式
CEPH distributed storage performance tuning (6)
nodejs body-parser中间件处理类型 multipart/form-data 的 POST 表单数据,req.body无法接收到数据
heap
详述HashSet的add方法
POJ1273 Drainage Ditches【最大流】【SAP】
关于 CMS 垃圾回收器,你真的懂了吗?
【表达式计算】双栈 : 表达式计算问题的通用解法
Julia beginner tutorial 2022