数据结构-最小生成树(C++详细解题) 摘要:#### 普利姆(Prim)算法原理: 1. 算法开始时选择一个起始点作为最小生成树的根节点,并将其加入最小生成树中。 3. 对于还未加入最小生成树的顶点,维护一个距离集合(在Prim’s算法中用…… 题解列表 2023年07月20日 0 点赞 0 评论 744 浏览 评分:9.9
鞍点#详细代码,一看就会。 摘要:解题思路:看代码注意事项:数组不要越界参考代码:#include <bits/stdc++.h> using namespace std; int a[10000][100]; int main…… 题解列表 2023年07月20日 0 点赞 1 评论 307 浏览 评分:8.4
整数去重:vector 摘要:```cpp #include using namespace std; int vis[105]={0};//标记输入是否有重复 int main() { int n; cin>>n;…… 题解列表 2023年07月20日 0 点赞 0 评论 728 浏览 评分:9.9
分离整数的各个数位 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int x,a; cin >> x; w…… 题解列表 2023年07月20日 0 点赞 0 评论 361 浏览 评分:9.9
题解 3012: 分苹果 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>int main(){ int n; scanf("%d",&n); printf("%ld",(n+1)…… 题解列表 2023年07月20日 0 点赞 0 评论 396 浏览 评分:0.0
余数相同问题(c++) 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a,b,c; cin>>a>>b>>c; int …… 题解列表 2023年07月19日 0 点赞 0 评论 526 浏览 评分:0.0
校门外的坤 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>int l,m,tree[10000000];using namespace std;int main(){ int…… 题解列表 2023年07月19日 0 点赞 0 评论 398 浏览 评分:0.0
1099: 校门外的树(勿看,半成品) 摘要:解题思路:#include <bits/stdc++.h>// using namespace std; int ji[10000000]; int main() { int l,m…… 题解列表 2023年07月19日 0 点赞 0 评论 325 浏览 评分:2.0
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int l,m,tree[10000000],s,e,sum=0;int main…… 题解列表 2023年07月19日 0 点赞 0 评论 542 浏览 评分:0.0
题解 2839: 石头剪刀布 摘要:先仔细读题,理解题目的含义石头剪刀布是常见的猜拳游戏。石头胜剪刀,剪刀胜布,布胜石头。如果两个人出拳一样,则不分胜负。一天,小A和小B正好在玩石头剪刀布。已知他们的出拳都是有周期性规律的,比如:“石头…… 题解列表 2023年07月19日 2 点赞 0 评论 1082 浏览 评分:9.9