题解列表

筛选

2838: 有趣的跳跃解题

解题思路:不进行排序,1~n-1作为数组下标,命中的该元素直接设置为1(默认值为0),如果已经为1了,重新设置直接可以打印Notjolly,退出程序。最后对1-~n-1的数组元素直接判断,看值是否都为1,则打印Jolly,如果其中有一个为0,打印Notjolly,退出。

python|并查集

摘要:```pythonclass UnionFind: def __init__(self, n): self.parents = list(range(n))……

幸运儿问题模拟求解

解题思路:注意事项:参考代码:#include#include#includeintmain(){intn,*people;while(scanf("%d",&n)!=EOF){people=(int*)malloc(sizeof(int)*n

高精度回文数

摘要:解题思路:判断是否为字符串是否为回文数其实就是将该字符串反转比较是否相同就行,还有就是高精度的加法运算要会```cpp#include #include #include ……

c++++++++++++++++++++++++

摘要:includeincludeincludeincludeinclude // 包含 pairusing namespace std;int main() { ve……