求帮助

学术版

先把字符串映射成整数(哈希表 / 排序),然后就是裸的[并查集](https://www.luogu.com.cn/problem/P3367),用并查集维护朋友关系即可。
by hzlqwq @ 2024-03-28 22:42:53


|