
-----图论只会dijkstra------
Error Man
我是菜逼
展开
-
poj 3660(floyd, 传递性(离散数学))
Cow ContestTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 15153 Accepted: 8461 DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a p...原创 2018-07-30 10:15:09 · 421 阅读 · 0 评论 -
POJ 3687 (拓扑排序 + 优先队列 + 吐血.jpg) 反向思考
Labeling BallsTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 15874 Accepted: 4660 DescriptionWindy has N balls of distinct weights from 1 unit to N units. Now he tr...原创 2018-08-03 17:19:01 · 278 阅读 · 0 评论 -
POJ 2449 第k短路模版题 (dijkstra + A star)
Remmarguts' DateTime Limit:4000MS Memory Limit:65536K Total Submissions:35009 Accepted:9461 Description"Good man never makes girls wait or breaks an appointment!" said the ...原创 2018-07-27 16:17:12 · 470 阅读 · 0 评论 -
POJ 1659 (Havel-Hakimi定理,度序列 还原无向图)
题目链接:http://poj.org/problem?id=1659题意: 中文题目,不用说了吧。思路: havel算法的应用:(1)对序列从大到小进行排序。(2)设最大的度数为 t ,把最大度数后(不包括自己)的 t 个度数分别减1,然后最大的度数置0(意思就是把度数最大的点与后几个点进行连接)(3)如果序列中出现了负数,证明无法构成。如果序列全部变为0,证明能构成,跳出...原创 2018-08-02 21:53:59 · 367 阅读 · 0 评论 -
POJ 3249(记忆化搜索,,,,DAG最长路)
题目链接:http://poj.org/problem?id=3249 题目大意:给出n个点,m条边,每个点都提供了相对的点权值,然后给出相连着的边,问从起点走到终点最大利润值。起点是入度为0的点,终点是出度为0的点。思路1:SPFA求最长路,正向建边TLE,反向建边4400msAC。。。。2:记忆化搜索,每次都保存当前点到终点获得的最大利润。AC代码,搜索 ....1844ms:...原创 2018-08-03 11:46:28 · 364 阅读 · 0 评论 -
HDU - 5952 Counting Cliques (暴力dfs)
Counting Cliques A clique is a complete graph, in which there is an edge between every pair of the vertices. Given a graph with N vertices and M edges, your task is to count the number of cliques ...原创 2018-10-10 10:51:39 · 228 阅读 · 0 评论 -
HDU - 4771 Stealing Harry Potter's Precious (dfs + bfs,dfs 暴力 tsp)
Stealing Harry Potter's PreciousHarry Potter has some precious. For example, his invisible robe, his wand and his owl. When Hogwarts school is in holiday, Harry Potter has to go back to uncle Vernon...原创 2018-10-16 23:46:43 · 219 阅读 · 0 评论