随笔分类 - 并查集
摘要:主要是欧拉回路的基础知识,用并查集加工处理注意欧拉回路和并查集的细节判断不能粘贴复制,一定要理解之后再敲一遍代码,否则浪费更多的时间#include <stdio.h>#include <string.h>int vis[30],in[30],out[30],father[30];int findx(int t){ if(father[t]!=t) father[t]=findx(father[t]); return father[t];}void merge(int v,int g){ int x,y; x=findx(v); y=findx(g); if(x!=y)
阅读全文

浙公网安备 33010602011771号