优质题解 迪杰斯特拉算法求最小权值 摘要:总体思路:本质上,我使用了迪杰斯特拉算法。如果没有了解的朋友,只要知道这个算法的功能,给一副图,一个起点,可以求出图上所有点到起点的**最短距离**。 但是在具体的代码细节中,这道题还是需要我们仔细…… 题解列表 2023年04月06日 0 点赞 0 评论 597 浏览 评分:9.9
计算(a+b)*c的值题解 摘要:解题思路:括号内先算再乘注意事项:注意三个变量输入的顺序和计算的顺序参考代码:#include<iostream>using namespace std;int main(){ long lon…… 题解列表 2023年04月06日 0 点赞 0 评论 622 浏览 评分:9.9
1163: 排队买票(dfs) 摘要:解题思路:先用dfs将可行的排队顺序总数找出,然后再算出小朋友排队的总数如样例我们用dfs找出可行的排列顺序为(0为1元的小朋友,1为2元的小朋友)00110101两种排队顺序然后将小朋友放入:第一个…… 题解列表 2023年04月06日 0 点赞 0 评论 251 浏览 评分:0.0
dp——个人感觉解释的很容易理解 摘要:参考代码:#include <iostream> using namespace std; const int N = 110, M = 300000;//大一点好 int n,sum,w[N…… 题解列表 2023年04月06日 0 点赞 1 评论 668 浏览 评分:9.9
1280: 找啊找啊找GF 摘要:解题思路 01背包的思路,先找到可以泡最多妹子的数量,然后再在最多妹子数量中找到时间最少得注意事项:参考代码:#include<bits/stdc++.h> using namespace std;…… 题解列表 2023年04月05日 0 点赞 0 评论 264 浏览 评分:0.0
纯纯地dfs暴力就完了 摘要:给每个小朋友打上标记,圈的长度就是当前标记-小朋友的标记 ```cpp #include using namespace std; #define ll long long const in…… 题解列表 2023年04月05日 0 点赞 0 评论 317 浏览 评分:9.9
编程入门]结构体之时间设计 想了好久 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;struct time{ int year; int month; int day;};int…… 题解列表 2023年04月05日 0 点赞 0 评论 187 浏览 评分:0.0
2134: 信息学奥赛一本通T1270-混合背包 摘要:解题思路: 混合背包问题就是0/1背包、完全背包、多重背包问题的混合,将这三种背包问题全部转化为0/1背包问题来做。 注意事项: 因为要将多重背包和完全背包转化为01背包所以要将N设为可能的…… 题解列表 2023年04月05日 0 点赞 0 评论 295 浏览 评分:9.9
蓝桥杯2022年第十三届省赛真题-最长不下降子序列 摘要:```c #include #include #include #define mem(a,b) memset(a,b,sizeof a) #define cinios (ios::sync…… 题解列表 2023年04月05日 0 点赞 0 评论 1199 浏览 评分:6.7
题解 1267: A+B Problem 摘要:解题思路:加一下参考代码:#include<iostream>using namespace std;int main(){ int a,b; cin>>a>>b; cout<<a+b;…… 题解列表 2023年04月05日 0 点赞 0 评论 218 浏览 评分:9.7