图论
文章平均质量分 85
kidozh
这个作者很懒,什么都没留下…
展开
-
拓扑排序
A - Sorting It All OutTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionAn ascending sorted sequence of distinct values is one i原创 2014-07-28 20:39:57 · 362 阅读 · 0 评论 -
倒序的拓扑排序
#include#include#includeusing namespace std;int chudu[209];int deg[209][209];int wei[209];int main(){int cases;scanf("%d",&cases);while(cases--){int n,m;scanf("%d%d",&n,&m)原创 2014-07-29 12:25:28 · 495 阅读 · 0 评论 -
优化下的来去问题
C - 模板Time Limit:8000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionIn the age of television, not many people attend theater performances.原创 2014-07-30 22:04:49 · 423 阅读 · 0 评论 -
图论~~!!!
A - 模板Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionBessie is out in the field and wants to get back to the barn to get as m原创 2014-07-30 16:08:16 · 348 阅读 · 0 评论 -
spfa的最小生成树~
#include#include#include#include#include#includeusing namespace std;#define N 210#define d double#define INF 0xffffffint n;int visit[N];d dis[N],len[N][N];d a,b,c;struct node{ d x,y;原创 2014-07-30 19:49:00 · 376 阅读 · 0 评论 -
prim算法
最小生成树prim算法实现今天从志权师兄那里学会了最小生成树。所谓生成树,就是n个点之间连成n-1条边的图形。而最小生成树,就是权值(两点间直线的值)之和的最小值。 首先,要用二维数组记录点和权值。如上图所示无向图:int map[7][7]; map[1][2]=map[2][1]=4; map[转载 2014-08-21 18:34:29 · 410 阅读 · 0 评论 -
裸floyd大法
这个题主要就是裸地原创 2014-09-03 20:16:23 · 418 阅读 · 0 评论