08 2015 档案
摘要:Kruskal#include#include#include#includeusing namespace std;const int maxn=120;int fa[maxn];int n;struct node{ int s,t; double w;} edge[maxn*maxn...
阅读全文
摘要:并查集+最小生成树#include#include#include#includeusing namespace std;const int M=124;const int N=124*124;int fa[M];int m,n;int find(int x){ if(fa[x]!=x) fa...
阅读全文
摘要:矩阵快速幂。#include#include#include#includeusing namespace std;const int maxn=25;const int MOD=1000;int x,y,s,t,m,n,k;struct node{ int matrix[maxn][maxn...
阅读全文
摘要:简单的拓扑排序,按字典序输出。#include#include#include#include#include#includeusing namespace std;int n,m,u,v;const int maxn=1111;//设置节点数量int InDegree[maxn];//入度int ...
阅读全文

浙公网安备 33010602011771号