随笔分类 - ACM--并查集
摘要:题目链接 题意:n个数(即1-n)和m个操作: 1表示把x和y合并,2表示把x移到y集合里面,3表示统计x集合的元素个数 1,3好说,关键是2操作,可以先把2删除掉,删除的操作可以找一个其他的数字来取代x,这样就有新生出来一个集合,移到y集合就合并 #include <iostream> #incl
阅读全文
摘要:treeAccepts: 143Submissions: 807Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)问题描述有一个树(nn个点, n-1n−1条边的联通图),点标号从11~nn,...
阅读全文
摘要:Parity gameTime Limit:1000MSMemory Limit:65536KTotal Submissions:7288Accepted:2833DescriptionNow and then you play the following game with your friend...
阅读全文
摘要:Find them, Catch themTime Limit:1000MSMemory Limit:10000KTotal Submissions:37722Accepted:11632DescriptionThe police office in Tadu City decides to say...
阅读全文

浙公网安备 33010602011771号