摘要:
题目传送门 一、拓扑排序完整代码(bfs) #include <bits/stdc++.h> using namespace std; const int N = 10010; int n; //必须完成的杂务的数目 int x; //工作序号 int y; //一些必须完成的准备工作 int an 阅读全文
摘要:
题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 100010; int n, m, x, y; vector<int> p[N];//邻接表 bool st[N]; //是否走过 //深度优先搜索 void dfs( 阅读全文
摘要:
题目传送门 一、STL+scanf大法 #include <bits/stdc++.h> using namespace std; int t;//数据组数 int n;//表示给定的数 unordered_map<int, int> _map; int x; int main() { scanf( 阅读全文