加载中...

摘要: #include<queue> #include<cstdio> #include<cstring> #define N 500005 using namespace std; struct edge{ int to,val,next; } e[N]; int m,n,p,s,cnt,g[N],u[ 阅读全文
posted @ 2022-09-01 23:41 liang302 阅读(17) 评论(0) 推荐(0) 编辑
摘要: #https://www.luogu.com.cn/problem/P1262 间谍网络 关键在缩点的时候选择性的tarjan 只会搜搜得到的点 #include <iostream> #include <cstring> #include <algorithm> #include <unorder 阅读全文
posted @ 2022-09-01 20:26 liang302 阅读(14) 评论(0) 推荐(0) 编辑
摘要: #https://www.luogu.com.cn/problem/P2194 对a56爆大奖在线娱乐连通块的值求里面的点的最小值 然后加起来就是遍历所有点的最小值 方案数就根据乘法原理乘起来就可以 #include <iostream> #include <cstring> #include <algorithm 阅读全文
posted @ 2022-09-01 16:59 liang302 阅读(29) 评论(0) 推荐(0) 编辑
摘要: ##https://www.luogu.com.cn/problem/P1407 给n个男 女关系 在给m个男 女关系 a56爆大奖在线娱乐可能出轨的关系 如果原来的男女的关系断裂后(出轨) 是否能重新变成一个联通关系 这里使用强连通分量进行建图 对男设定为i 对应的女设为i+n a56爆大奖在线娱乐结果是i -> i+n #in 阅读全文
posted @ 2022-09-01 16:06 liang302 阅读(20) 评论(0) 推荐(0) 编辑