题解列表

筛选

子串分值复杂解法

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>#include<string>using namespace std;int leftbound[100000];int ……

勉强通过测试没办法解决两行两列问题的c++代码

摘要:解题思路:首先确定该题目是属于数据结构中的连通图的遍历问题,想到要使用dfs即深度优先遍历,属于一个递归,回溯和剪枝问题注意事项:要注意递归循环时需要在设置一个数组来标记该点有没有被访问过,否则会出现……

辗转相除法

摘要:```cpp #include using namespace std; int gcd(int a, int b){ return b ? gcd(b, a % b) : a; ……

尝除法求约数

摘要:```cpp #include using namespace std; void check(int n){ vectora; for(int i = 1; i n; c……

没毛病吧?、老铁

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     cout<<4150<<endl; cout……