展开 题目背景 John的农场缺水了!!! 题目描述 Farmer John has decided to bring water to his N (1 <= N <= 300) pastures which are conveniently numbered 1…N. He may bring water to a pasture either by building a well in t
floyd跑出最短路后按a顺序相加即可 #include<bits/stdc++.h>#define rep(i,x,y) for(register int i =x ;i <= y; ++ i)#define repd(i,x,y) for(register int i = x; i >= y ; -- i)using namespace std;template<typename T