spfa判断图中是否存在负权 摘要://利用spfa判断该图存不存在负环 #include<iostream> #include<cstring> #include<algorithm> #include<queue> …… 文章列表 2024年07月10日 0 点赞 0 评论 190 浏览 评分:0.0
spfa:正权负权边通用最短路 摘要:#include<iostream> #include<cstring> #include<algorithm> #include<queue> using namespace std; …… 文章列表 2024年07月10日 1 点赞 0 评论 178 浏览 评分:10.0
堆优化版最短路(dijkstra) 摘要:#include<iostream> #include<cstring> #include<algorithm> #include<vector> #include<queue> us…… 文章列表 2024年07月09日 0 点赞 0 评论 182 浏览 评分:0.0
最短路(dijkstra) 摘要:#include<iostream> #include<algorithm> #include<cstring> using namespace std; const int N=1e1…… 文章列表 2024年07月09日 0 点赞 0 评论 216 浏览 评分:9.9
拓扑排序/家谱树(板子) 摘要://按拓扑排序排列 不断删除入度为0的节点 #include<iostream> #include<cstring> #include<algorithm> using namesp…… 文章列表 2024年07月09日 0 点赞 0 评论 187 浏览 评分:0.0
2023raip_u3_投子游戏(遍历) 摘要://注意: 可能重投之后仍和原来一样 初始化:分母为1,概率为-1,个数为0 #include<iostream> #include<algorithm> #include<cmath> …… 文章列表 2024年07月08日 0 点赞 0 评论 159 浏览 评分:0.0
2023raip_u2_出院(哈希) 摘要:/*注意1、两个字符串拼接,不要考虑三个或三个以上 2、两个字符串可多种拼接方式,因此要用sum计算成功拼接次数,只有sum==1的时候才符合条件 …… 文章列表 2024年07月06日 0 点赞 0 评论 152 浏览 评分:0.0
蓝桥杯算法提高VIP-数组输出 摘要:题目描述输入一个3行4列的数组,找出该数组中绝对值最大的元素、输出该元素的绝对值及其两个下标值。如有多个输出行号最小的,还有多个的话输出列号最小的。输入无输出无样例输入1 2 3 5-2 5 8 96…… 文章列表 2024年07月02日 0 点赞 0 评论 199 浏览 评分:0.0
题目 2806:人口增长问题 摘要:#include <bits/stdc++.h>using namespace std;int main(){double x;int n;cin>>x>>n;for(int i=1;i<=n;i++…… 文章列表 2024年06月30日 0 点赞 0 评论 158 浏览 评分:9.9
杨辉三角杨辉三角杨辉三角杨辉三角 摘要:题目描述对杨辉三角陌生吗?下面请你求出:杨辉三角中,第i行j列的数据11 11 2 11 3 3 1……这里i和j均小于等于1000输入两个数i和j,表示行和列。输出一个数,表示相应的数字。样例输入3…… 文章列表 2024年06月14日 0 点赞 0 评论 172 浏览 评分:0.0