最短路
最短路类习题总结
Gene_INNOCENT
Wait for the sunrise!
展开
-
【Gym - 101806X】Xtreme NP-hard Problem【2018 KAIST RUN Spring Contest】【NP-hard】【大搜索】
Description: Caution! This problem turned out to be NP-hard. But since there were no rules against writing an NP-hard problem, we decided to leave this problem here. There is a bidirectional graph c...原创 2018-09-03 17:29:13 · 506 阅读 · 0 评论 -
HDU1317 —— 最长路+判断正环
题意:有n个房间(n <= 100),每个房间有一个点权(第1号房间和第n号房间权值均为0),到达该房间时会自动获得该点权(权值可能为负,范围是-100~+100).给出一些有向边。有一个人,初始能量值为100,初始位置是第一号房间,要走到第n号房间,且路途中不得使身上能量值小于或等于0(必须大于0).能到达第n个房间就算赢,问是否能赢。解题思路: 先用Floyd判断图是否连通,能否从...原创 2018-05-22 22:36:43 · 388 阅读 · 0 评论