1895队列操作C++ 摘要:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ …… 题解列表 2025年05月25日 0 点赞 0 评论 4 浏览 评分:0.0
1703:BFS广搜 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[51][51];int visited[51];int n;…… 题解列表 2025年05月25日 0 点赞 0 评论 7 浏览 评分:0.0
1680: 数据结构-八进制数 摘要:参考代码:#include<iostream>#include<stack>using namespace std;int main() { int num; while (c…… 题解列表 2025年05月20日 0 点赞 0 评论 21 浏览 评分:0.0
STL容器 map 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ map<int,int>mp; i…… 题解列表 2025年05月18日 1 点赞 0 评论 75 浏览 评分:10.0
穿越雷区 BFS实现 摘要:解题思路: BFS实现穿越雷区最短路径,主要是地图的输入,以及起始、终点的坐标计算,然后应用模板实现。注意事项: &nbs…… 题解列表 2025年05月18日 0 点赞 0 评论 11 浏览 评分:0.0
【STL】美国大选,使用STL库中的vector来解决 摘要:输入处理:循环读取输入的州数 n,直到 n=0 时终止。对于每个 n,读取 n 个州的选民数并存储在 vector 中。输入验证:州的数量 n 必须在 [1, 100] 之间。每个…… 题解列表 2025年05月18日 0 点赞 0 评论 45 浏览 评分:0.0
迷宫BFS实现 摘要:解题思路: 设置好队列结点,结构体类型,包含坐标,以及路径。注意事项: 坐标偏移量,左下右上设置…… 题解列表 2025年05月18日 0 点赞 0 评论 22 浏览 评分:0.0
2549单词统计 C ++: string和substr()笔记 摘要:解题思路:读取输入字符串和单词。检查单词长度是否大于字符串长度,如果是则输出0。遍历所有可能的起始位置,取出子串与单词比较,统计匹配次数。输出统计结果。注意事项:参考代码:#include <b…… 题解列表 2025年05月16日 0 点赞 0 评论 30 浏览 评分:0.0
1815排列序数 C++:next_permutation()与do while 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s;&n…… 题解列表 2025年05月16日 0 点赞 0 评论 19 浏览 评分:0.0
2046输出全排列 c++:next_permutation()与do while笔记 摘要:解题思路:next_permutation()给出下一个序列在全排列中的下一个序列注意事项:参考代码:#include<bits/stdc++.h>using namespac…… 题解列表 2025年05月16日 0 点赞 0 评论 16 浏览 评分:0.0