优质题解 BFS板子题(C++版) 摘要:# 分析题意 这道题是一道BFS的板子题,属于是在网格中寻找最短路。在求解无边权最短路问题时,我们一般都可以采用BFS来做。 # BFS BFS简而言之,就是优先考虑离当前节点最近的所有点,再依…… 题解列表 2023年10月29日 0 点赞 0 评论 1113 浏览 评分:9.9
暴搜求扫雷游戏地雷数 摘要:首先看这道题的数据范围,明显比较小。所以我们可以直接考虑暴力。 我们可以遍历每一个点,然后分别搜索每个点周围的雷的数量,然后直接输出。 一下是这种方式的代码。 ```cpp #include …… 题解列表 2023年10月28日 0 点赞 0 评论 697 浏览 评分:9.9
2330: 信息学奥赛一本通T1178-成绩排序 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; struct dev { …… 题解列表 2023年10月28日 0 点赞 0 评论 485 浏览 评分:0.0
2329: 信息学奥赛一本通T1177-奇度单增序列 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { …… 题解列表 2023年10月28日 0 点赞 0 评论 363 浏览 评分:0.0
判决素数个数(自定义函数) 摘要:解题思路:在主函数里调用自定义的函数参考代码:#include<iostream>using namespace std;void pss(int x,int y){ int s = 0; int i…… 题解列表 2023年10月28日 0 点赞 0 评论 367 浏览 评分:9.9
2853: 字符替换 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;char s[100000],a,b;int main(){ cin>>s;…… 题解列表 2023年10月28日 0 点赞 0 评论 218 浏览 评分:0.0
2846: 统计数字字符个数 摘要:解题思路:注意事项:要输入字符0到字符9参考代码:#include <bits/stdc++.h>using namespace std;char s[100000];int main(){ i…… 题解列表 2023年10月28日 0 点赞 0 评论 264 浏览 评分:0.0
2236: 蓝桥杯算法训练-大小写转换 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;char s[100000];int main(){ cin>>s; …… 题解列表 2023年10月28日 0 点赞 0 评论 258 浏览 评分:0.0
第十三次作业2题 摘要:解题思路:利用桶排序思想计数注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int tong[100000];int main(){ …… 题解列表 2023年10月28日 0 点赞 0 评论 239 浏览 评分:0.0
[编程入门]自定义函数之字符串拷贝 STL大法 摘要: 参考代码: #include <iostream> using namespace std; string x; int n,k; int main() { cin>>n>>…… 题解列表 2023年10月28日 1 点赞 0 评论 279 浏览 评分:0.0