随笔分类 -  图论

848. 有向图的拓扑序列
摘要:https://www.acwing.com/problem/content/850/ #include<bits/stdc++.h> using namespace std; const int N=100010; vector<int> p[N]; //vector变长数组来写邻接表 queue 阅读全文
posted @ 2023-03-30 17:24 ljq0120 阅读(15) 评论(0) 推荐(0) 编辑
图论
摘要:拓扑排序 #include<iostream> #include<cstdio> #include<cstring> using namespace std; int a[101][101],c[101],r[101],ans[101]; int E; int head[100010]; int t 阅读全文
posted @ 2022-08-21 11:36 ljq0120 阅读(13) 评论(0) 推荐(0) 编辑