- 博客(2)
- 收藏
- 关注
原创 hdu 1811 拓扑排序+并查集判断
拓扑排序的两个性质:①如果一次入队入度为零的点大于1则说明拓扑排序序列不唯一②如果排序的总个数小于给定的个数,则说明存在回路#include #include #include #include #include using namespace std; struct node { int a,b; char c; } q[30000]; int indegree[30000];
2017-06-27 15:00:35 265
原创 hdu 1317 spfa判环求最长路
#include #include #include #include #include #include #include using namespace std; vectorG[300]; int book[300],val[300],dis[300],time[300]; #define inf 0x3f3f3f int spfa(int n) { memset(book,0,
2017-06-27 14:15:31 311
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人