随笔分类 -  拓扑排序

摘要:最短路(vector+Dijkstra优先队列优化) #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<queue> #include<stack> #include<set> #in 阅读全文
posted @ 2019-07-29 22:10 black_hole6 阅读(198) 评论(0) 推荐(0)
摘要:An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to large 阅读全文
posted @ 2019-07-28 22:35 black_hole6 阅读(273) 评论(0) 推荐(0)
摘要:ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many ... 阅读全文
posted @ 2019-03-29 16:46 black_hole6 阅读(171) 评论(0) 推荐(0)
摘要:糟糕的事情发生啦,现在大家都忙着逃命。但是逃命的通道很窄,大家只能排成一行。 现在有n个人,从1标号到n。同时有一些奇怪的约束条件,每个都形如:a必须在b之前。 同时,社会是不平等的,这些人有的穷有的富。1号最富,2号第二富,以此类推。有钱人就贿赂负责人,所以他们有一... 阅读全文
posted @ 2019-03-29 09:28 black_hole6 阅读(143) 评论(0) 推荐(0)
摘要:有N个比赛队(1#include#include#include#include#include#include#include#include#includeconst int maxn=1e5+5;typedef long long ll;using namesp... 阅读全文
posted @ 2019-03-29 09:15 black_hole6 阅读(161) 评论(0) 推荐(0)