题解列表
蓝桥杯2022年第十三届省赛真题-求和(C++解法)
摘要:解题思路:参考大佬题解,相当于运用了数学思维注意事项:参考代码:#include<iostream>
using namespace std;
int main()
{
int n,……
信息学奥赛一本通T1330-最少步数
摘要:解题思路:BFS注意事项:参考代码:#include<iostream>
#include<queue>
#include<cstring>
using namespace std;
cons……
信息学奥赛一本通T1329-细胞
摘要:解题思路:BFS注意事项:参考代码:#include<iostream>
#include<queue>
using namespace std;
const int N = 1e3 +10;
……
1445: 蓝桥杯历届试题-最大子阵
摘要: #include
using namespace std;
int n,m,ans=-5005,sum;
int a[505][505];
int pr……
找第一个只出现一次的字符,不使用复杂函数的简单解法
摘要:题目说了输入的字符串仅有小写字母,那么可以定义一个数据元素个数为26的整型数组,用于记录各个字符出现的次数,出现次数为1的即为答案,没有则输出no
```cpp
#include
#inclu……
sort函数妙解数位排序
摘要:解题思路:在sort函数中添加优化的比较函数cmp注意事项:数组要比十万大一点参考代码:#include <iostream>
#include<algorithm>
using namespac……
不用循环,总共21行代码搞定!!
摘要:
**本题的思路大致为先将给出的四个数字进行四选三的组合,再将选出来的三个数字进行排序,那么就有两种实现方案:
(1)将给出的四个数字写进数组里,进行数组的循环挑选遍历;
(2)将选出来的三个数……
选数异或(线段树思路详解)
摘要:解题思路: 思路详解在:https://www.acwing.com/solution/content/228403/参考代码:const int N = 1e5;
#include <iostre……
利用重载进行多个数字相加
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int add(int a,int b){ return (a+b);}int add(……