摘要:
分块 分块1 单点查值,区间加值 #include <iostream> #include <cmath> using namespace std; #define int long long const int N = 5e4+10,M = 1000; int a[N],n,m,ed[M],st[ 阅读全文
摘要:
Johnson Johnson算法是一种Donald B. Johnson在1977年发布的:在边加权有向图中找到所有顶点对之间最短路径的算法。 jonhnson允许某些边权重为负数,但不能是负环。 通过使用Bellman-Ford 算法来计算输入图的转换,以消除所有负权重,从而允许在转换后的图上使 阅读全文
摘要:
摘抄自 #include <bits/stdc++.h> using namespace std; #define debug(x) cout << #x << "=" << x << endl; const int N = 1e4 + 5; int n, m, cn, col[N]; int a[ 阅读全文
摘要:
7-23洛谷做题记录 P1359 租用游艇 DP求或最短路 #include <bits/stdc++.h> using namespace std; int f[210],i,j,k,n; int main() { cin >> n; for(int i = 1 ; i <= n ; i ++ ) 阅读全文