A. Learning Languages time limit per test:2 seconds memory limit per test:256 megabytes The "BerCorp" company has got n employees. These employees can use m approved official languages for the formal correspondence. The languages are numbered wi…
A. Learning Languages time limit per test:2 seconds memory limit per test:256 megabytes input standard input output standard output The "BerCorp" company has got n employees. These employees can use m approved official languages for the formal c…
意甲冠军:被判处无向图无环和连接无处不在 思考:并检查集合,trap 您可能有一个直接输入0 0 并且....合并的时候按某一个方向会爆栈,爆了好几次...下次考虑一下直接递归找祖先吧 #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int N =1e5+1e2; int fa[N]; int getf(i…