题解列表

筛选

Python | 生成器

摘要:### yieldfrom运用在dfs问题 2038: [简化型背包]([简化型背包](https://www.dotcpp.com/vipstudy_suanfa/problem/?id=203……

最普通的数组解法

摘要:解题思路:#include<stdio.h>#include<string.h>int main(){char arr[100];int i=0;scanf("%s&……

python|sys.stdin

摘要:```pythonimport sysfrom collections import Counter# python可能超时过不了全部,使用sys.stdin一次all in输入数据,……

python|并查集

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

2838: 有趣的跳跃解题

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

出圈直接解法

摘要:解题思路:注意事项:同样适用于m大于n的情况。参考代码:#include<stdio.h>#include<stdlib.h>#include<string.h>i……

高精度乘法

摘要:解题思路:思路很简单和加法差不多,只不过可能每个位数相乘后怎么加才是重点,重点理解这串代码:```cpp while(ls1>>s2; if(s1.size()……

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

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;struct node { ch……