当前位置:网站首页>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 :
边栏推荐
- 堆
- HDU1698_ Just a Hook
- POJ1988_ Cube Stacking
- MySQL extensions
- redis分布式在线安装
- 正向预查和反向预查
- Enjoy the luxury meta universe louis:the game, and participate in the NFT series digital collection white roll activity | tutorial
- What should I do if I can't see any tiles on SAP Fiori launchpad?
- flinksql从Oracle同步数据到Doris,一共50几个字段,Oracle表中3000多万条
- 【表达式计算】双栈 : 表达式计算问题的通用解法
猜你喜欢

Isolation level

JVM memory layout detailed, illustrated, well written!

「游戏引擎 浅入浅出」4.1 Unity Shader和OpenGL Shader

Xposed+FDex2 app脱壳 (黑猫投诉app脱壳)

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

Cvpr22 | graph neural architecture search of relational consciousness

js真伪数组转换

Error: slf4j: class path contains multiple slf4j bindings

Set接口

CEPH distributed storage performance tuning (6)
随机推荐
关于 CMS 垃圾回收器,你真的懂了吗?
Necessary foundation: Signature Verification
Will MySQL fail to insert data? Why?
Cvpr22 | graph neural architecture search of relational consciousness
内涵语录
JVM memory layout detailed, illustrated, well written!
sql 语句问题, 求计算相差10分钟以内的数据作为同一批次数据显示
2021-03-15
详述try-catch-finally
CVPR22 | 关系意识的图神经架构搜索
爱可可AI前沿推介(7.27)
概述静态内部类与非静态内部类
String to realize fuzzy query
时间工具类,得到当前时间,date转string
Overview of famous inner classes and anonymous inner classes
ArrayList常用方法总结
Xposed+fdex2 app shelling (black cat complains about app shelling)
MySQL common commands
Wechat applet session holding
Isolation level