计负均正 使用C++语言编写 代码可能不是最简洁的 但是通俗易懂 容易理解 适合入门的 欢迎大家一起讨论 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <iomanip>using namespace std;int main() { const int n …… 题解列表 2024年03月05日 0 点赞 0 评论 632 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-冶炼金属 摘要:#include<iostream> using namespace std; const int MAX_N = 1e4 + 1; // 规定数据范围不超 int N, A[MAX_N], B…… 题解列表 2024年03月05日 0 点赞 0 评论 884 浏览 评分:9.9
台球碰撞问题 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<math.h>//调用数学库函数//使用三角函数注意事项://1、包含头文件…… 题解列表 2024年03月05日 0 点赞 0 评论 602 浏览 评分:0.0
图的遍历-BFS广度优先搜索(C++) 摘要:解题思路:#include<iostream> using namespace std; #define MAX_VERTEX_NUM 50 // 定义最大结点数; #define MAXQSI…… 题解列表 2024年03月05日 0 点赞 0 评论 719 浏览 评分:0.0
蓝桥杯2022年第十三届省赛真题-数位排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int i,n,m,t,s; cin>>n>>m…… 题解列表 2024年03月05日 0 点赞 0 评论 521 浏览 评分:0.0
出差,dij算法 摘要:解题思路:使用图dijistra算法,根据题目进行一点变形即可注意事项:注意算法时间复杂度,以及一些小细节,代码中都有详细注释参考代码:#include<bits/stdc++.h>#define M…… 题解列表 2024年03月05日 0 点赞 0 评论 743 浏览 评分:9.9
合法C标识符 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s; cin>>s; for(int i=0;…… 题解列表 2024年03月05日 0 点赞 0 评论 515 浏览 评分:0.0
二分查找求方案数 (最大值) 二分查找巧克力划分的方案数(最大值)```c++#includeusingnamespacestd;constintN=1e5+10;typedeflonglongLL;intn,k;inth[N],w[N];boolcheck(intmid){LLres=0;for(inti=0;i 题解列表 2024年03月05日 0 点赞 0 评论 644 浏览 评分:0.0 双向循环链表:C++面向对象 ######参考代码```cpp#includeusingnamespacestd;structnode{intdata;node*prev;node*next;/*构造*/node(node*pre=nullptr,node*ne=nullptr):prev(pre), 题解列表 2024年03月04日 0 点赞 0 评论 615 浏览 评分:9.9 图的遍历-DFS深度优先搜索(C++) 摘要:#include<iostream> using namespace std; #define MAX_VERTEX_NUM 20 // 定义最大结点数 int graph[MAX_VERTEX…… 题解列表 2024年03月04日 0 点赞 0 评论 769 浏览 评分:0.0 « 12...257258259260261262263...16501651 »
双向循环链表:C++面向对象 ######参考代码```cpp#includeusingnamespacestd;structnode{intdata;node*prev;node*next;/*构造*/node(node*pre=nullptr,node*ne=nullptr):prev(pre), 题解列表 2024年03月04日 0 点赞 0 评论 615 浏览 评分:9.9
图的遍历-DFS深度优先搜索(C++) 摘要:#include<iostream> using namespace std; #define MAX_VERTEX_NUM 20 // 定义最大结点数 int graph[MAX_VERTEX…… 题解列表 2024年03月04日 0 点赞 0 评论 769 浏览 评分:0.0