图论
云帆是弟弟
import torch as tf
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ZOJ-1060 Sort It All Out(拓扑排序 判断全序成环)
An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequence A, B, C, D im...原创 2020-02-10 01:35:07 · 301 阅读 · 0 评论 -
【模板】A*算法(K短路问题)
介绍模板题:POJ-2449#include<iostream>#include<cstdio>#include<cstring>#include<queue>#include<algorithm>#define maxm 2000000#define maxn 10000using namespace std;st...原创 2020-01-23 00:24:13 · 198 阅读 · 0 评论 -
The 2019 Aisa Nanchang First Round Online Programming Contest B. Fire-Fighting Hero (最短路+超级源点)
传送门:https://nanti.jisuanke.com/t/41349DescriptionThis is an era of team success, but also an era of heroes. Throughout the ages, there have been numerous examples of using the few to defeat the many...转载 2019-09-19 22:37:40 · 222 阅读 · 0 评论 -
链式前向星【存图模板】
存图方式主要有:邻接矩阵(m[i][j]m[i][j]m[i][j]为w(w!=0),表示i点到j点有一条w权值的路)、邻接表(m[u][i]m[u][i]m[u][i]记录的值为v、w,表示u到v点有一个w权值的路)用邻接矩阵非常浪费空间,有一种效率高且省空间的存图方法叫链式前向星。前向星前向星就是一种邻接表。它是一个边集数组,先将起点按从小到大顺序排列,如果相同则按终点从小到大排序,并记...原创 2019-09-20 22:34:09 · 346 阅读 · 0 评论
分享