随笔分类 -  拓扑排序

摘要:topu序 //P1113 杂务 #include<bits/stdc++.h> using namespace std; inline int read(){ int k=0,f=1; char c=getchar(); while(!isdigit(c)){ if(c=='-') f=-1; c 阅读全文
posted @ 2019-11-08 11:35 DUO_JIaMInG 阅读(172) 评论(0) 推荐(0)
摘要:拓扑排序+dfs 很容易发现 对于一个点i 到达它经过的最多的城市数等于前一个节点的数量+1 求出每个点前面最多有多少个点就是答案 阅读全文
posted @ 2019-10-21 16:20 DUO_JIaMInG 阅读(135) 评论(0) 推荐(0)