摘要:
tarjan (讲道理信息传递就是这样的?) 阅读全文
摘要:
[证明] 待补充//Writer:GhostCai && His Yellow Duck#includeusing namespace std;int exgcd(int a,int b,int &x,int &y){ if(b==0){ x=1,... 阅读全文
摘要:
输出一条路径#include#include#include#define MAXN 200000using namespace std;int m,n; int in[MAXN];struct Edge{ int next,to;}e[MAXN];int ec... 阅读全文
摘要:
别忘了路径压缩。#include#include#include#define MAXN 300000using namespace std;int n,m;int fa[MAXN];int fnd(int x){ if(x!=fa[x]) return fa[... 阅读全文
摘要:
克鲁斯卡尔 很好的一个处理方式是 间接排序也就是通过在另一个数组排序号,保留原始数据。#include#include#include#define MAXN 200000using namespace std;int m,n,ans;int u[MAXN],v[MA... 阅读全文
摘要:
Following OrdersTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5289 Accepted: 2160DescriptionOrder is an important... 阅读全文