poj - 2513 Colored Sticks

Tire + 並查集 + Eular迴路,花了老長時間呢。html 1 #include <stdio.h> 2 #include <string.h> 3 const int N = 500050; 4 int next[5*N][26],d[5*N],cnt=0; 5 int fa[N],col[N],D[N],color=0; 6 int inst(char *t) 7 {
相關文章
相關標籤/搜索