摘要: 解题思路:(注意此题我没有特意处理大小写字符问题都能AC,应该是测试用例没有特意测试大小写) 解法一、将输入数据存成二叉排序树,再中序遍历输出即可 #include <stdio.h> #include <malloc.h> #include <string.h> typedef char Elem 阅读全文
posted @ 2020-04-07 16:22 跃鱼 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 解题思路:并查集思想 #include <stdio.h> #define Max 30000+1 int book[Max]; int f[Max]; int n,m; int getf(int x) { if(f[x]==x) return x; else return f[x]=getf(f[ 阅读全文
posted @ 2020-04-07 15:13 跃鱼 阅读(416) 评论(0) 推荐(0) 编辑