![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
文章平均质量分 76
Risir
这个作者很懒,什么都没留下…
展开
-
poj 1129 Channel Allocation (四色定理)
http://poj.org/problem?id=1129四色定理#include "stdio.h"#include "iostream"#include "cstring"using namespace std;bool g[27][27];原创 2011-08-02 16:27:50 · 365 阅读 · 0 评论 -
poj 2395 Out of Hay、2485 Highways(求最小生成树的最长边)
两道题都是求最小生成树的最长边。poj 2395 Out of Hay http://poj.org/problem?id=2395kruskal实现:#include "stdio.h"#include "string.h"#include "algo原创 2011-08-02 11:14:16 · 522 阅读 · 0 评论 -
poj 1511 Invitation Cards (SPFA、邻接表)
第一次写SPFA,小激动一下。。。#include "iostream"#include "stdio.h"#include "queue"#include "string.h"using namespace std;const int MAX = 1原创 2011-08-02 09:58:45 · 435 阅读 · 0 评论 -
poj 1164 The Castle (dfs)
http://poj.org/problem?id=1164提交的时候正遇oj挂了,害我白白错了几次,却不知情。。。 #include "iostream"#include "stdio.h"#include "string.h"using namespa原创 2011-08-02 16:24:15 · 646 阅读 · 0 评论 -
poj 1041 John's trip(欧拉回路入门题)
经典的欧拉回路题http://poj.org/problem?id=1041 欧拉回路:每条边经过一次且仅一次的称为欧拉回路(euler cycle, euler circuit)。存在欧拉回路的充要条件:每个点的度数都是偶数, 且图连通。#include "原创 2011-08-04 18:56:40 · 868 阅读 · 0 评论 -
poj 2186 Popular Cows (强连通分量 tarjan)
poj 2186 Popular Cows强连通分量 tarjanhttp://poj.org/problem?id=2186 #include #include "stdio.h"#include "string.h"using namespace原创 2011-08-17 14:24:23 · 337 阅读 · 0 评论