Intelligence System Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3414 Accepted Submission(s): 1494 Problem Description After a day, ALPCs finally complete their ultimate intelligence syste…
Network Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 5619 Accepted: 1939 Description A network administrator manages a large network. The network consists of N computers and M links between pairs of computers. Any pair of computers…
利用并查集按秩合并,保存每个点合并的时间: 求时间时,就一直跳u=fa[u],并记录路径上时间的最大值,代表最后一次合并的时间 #include<cstdio> #include<iostream> #define R register int ; using namespace std; inline int g() { R ret=,fix=; register :fix; +(ch^); while(isdigit(ch=getchar())); return ret*fix…