摘要: 传送门解题思路首先建一张反图,从终点dfs出哪个点直接或间接相连,然后直接跑最短路,跑的时候判断一下所连的点是否与终点相连。代码#include#include#include#include#include#includeusing namespace s... 阅读全文
posted @ 2018-08-25 22:11 Monster_Qi 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 传送门解题思路莫队题卡莫队。。。莫队只能拿到100分,满分200。正解主席树??发个莫队100分代码。代码#include#include#include#include#include#includeusing namespace std;const in... 阅读全文
posted @ 2018-08-25 17:50 Monster_Qi 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 传送门解题思路二分图匹配,首先二分一个答案,然后对于权值小于这个答案的,行向列连边,然后跑最大匹配,如果最大匹配数>n-k,说明权值比它小的也一定可以满足答案,就缩小边界,时间复杂度O(nmlog(nm))代码#include#include#include... 阅读全文
posted @ 2018-08-25 17:48 Monster_Qi 阅读(88) 评论(0) 推荐(0) 编辑