随笔分类 - Dijkstra
[Leetcode 787]中转K站内最便宜机票
摘要:题目 n个城市,想求从src到dist的最廉价机票 有中转站数K的限制,即如果k=5,中转10次机票1000,中转5次机票2000,最后返回2000 There are n cities connected by some number of flights. You are given an ar
阅读全文
[Leetcode 1631]最少体力消耗的路径Path With Minimum Effort
摘要:题目 https://leetcode.com/problems/path-with-minimum-effort/ 每个节点的height不同,矩阵从左上走到右下,求最小体力消耗 当前点体力消耗:max(来的那个节点的effort,|来的那个节点height-当前节点height|) 总最小体力消
阅读全文
浙公网安备 33010602011771号