Title
摘要: #Floyd——人人都是中间商 引入 有n座相互孤立的岛屿,每座岛屿都拥有被其他岛屿搭建桥梁的机会,但在起始的时候,每座岛屿并没有向其他岛屿搭建桥梁的能力,突然有一天,资金突然丰富起来了,但只能按顺序分配给这些岛屿,并使得这些岛屿具有向其他岛屿搭建桥梁的能力,同时在搭建得过程中一旦发现以该座岛屿为中 阅读全文
posted @ 2021-07-17 19:57 BeautifulWater 阅读(45) 评论(0) 推荐(0) 编辑
摘要: AcWing 1207.大臣的旅费 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5+10,M=2e5+20; ll dist[N]; int h[M],ne[M],e[M],w[ 阅读全文
posted @ 2021-07-17 11:18 BeautifulWater 阅读(102) 评论(0) 推荐(0) 编辑