题解列表

筛选

用指针数组和字符串解决

摘要:解题思路:声明一个指针数组和字符串,然后更改指针方向后输出指针数组注意事项:参考代码:#include <stdio.h>typedef struct bo { ……

并查集加上stl

摘要:解题思路:典型的并查集问题。同一个集合上可以相互跳跃。利用并查集,把所有元素合并,然后利用集合map统计各个根节点拥有的元素个数,然后利用优先队列,弹出前两个元素即为两个最大集合的数量,注意只有一个集……

c++--study||O.o

摘要:参考代码:#include<bits/stdc++.h>usingnamespacestd;usingll=long……

c++--study||O.o

摘要:参考代码:#include<bits/stdc++.h>usingnamespacestd;usingll=long……

python--study||O.o

摘要:参考代码:a,b,m=map(int,input().split())print(pow(a,b,m))……

c++--study||O.o 全排列枚举

摘要:解题思路:数据量最多只有10,考虑复杂度为阶乘的全排列模拟参考代码:#include<bits/stdc++.h>usingnamespacestd;&nb……