
图论
messyidea
只要心里欢喜,就算跑多远都不觉得累。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
强连通分量两种算法。tarjan和kosaraju
tarjan /***********************************************\ |Author: YMC |Created Time: 2014/5/10 22:36:04 |File Name: tarjan.cpp |Description: \***********************************************/ #in原创 2014-08-03 23:21:46 · 405 阅读 · 0 评论 -
poj 2449 Remmarguts’ Date第k短路 dij+A*
Description "Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told them a story. "Prince Remmarguts lives in原创 2014-08-03 23:23:31 · 460 阅读 · 0 评论 -
poj1199和zoj1506 Left labyrinths(搜索,两个oj都过了)
"The instructions to turn always to the left reminded me that such was the common procedure for discovering the central courtyard of certain labyrinths." in The garden of forking paths by Jorge Lui原创 2014-08-03 23:26:26 · 543 阅读 · 0 评论 -
poj 3013 spfa 最短路 Big Christmas Tree
Description Christmas is coming to KCM city. Suby the loyal civilian in KCM city is preparing a big neat Christmas tree. The simple structure of the tree is shown in right picture. The tree can原创 2014-08-03 23:24:25 · 420 阅读 · 0 评论 -
Checkposts (codeforces #244dv2) 强连通分量 tarjan算法
Your city has n junctions. There are m one-way roads between the junctions. As a mayor of the city, you have to ensure the security of all the junctions. To ensure the security, you have to build s原创 2014-08-03 23:25:18 · 850 阅读 · 0 评论 -
最小生成树两种算法。kruskal和prim
测试数据: 8 0 2 8 1 0 0 0 0 2 0 6 0 1 0 0 0 8 6 0 7 5 1 2 0 1 0 7 0 0 0 9 0 0 1 5 0 0 3 0 8 0 0 1 0 3 0 4 6 0 0 2 9 0 4 0 3 0 0 0 0 8 6 3 0 8个点,矩阵m[i][j]代表i与j的距离。 kruskal 所有边按长度从小到大排序,如果边的两点原创 2014-08-03 23:20:02 · 330 阅读 · 0 评论 -
hdu 5093 Battle ships 二分图匹配
Battle ships Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 52 Accepted Submission(s): 28 Problem Description Dear contestant,原创 2014-11-02 18:41:33 · 403 阅读 · 0 评论