摘要:
#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
阅读(25)
评论(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
阅读(34)
评论(0)
推荐(0)
摘要:
#https://www.luogu.com.cn/problem/P2194 对每个连通块的值求里面的点的最小值 然后加起来就是遍历所有点的最小值 方案数就根据乘法原理乘起来就可以 #include <iostream> #include <cstring> #include <algorithm 阅读全文
posted @ 2022-09-01 16:59
liang302
阅读(61)
评论(0)
推荐(0)
摘要:
##https://www.luogu.com.cn/problem/P1407 给n个男 女关系 在给m个男 女关系 表示可能出轨的关系 如果原来的男女的关系断裂后(出轨) 是否能重新变成一个联通关系 这里使用强连通分量进行建图 对男设定为i 对应的女设为i+n 所以结果是i -> i+n #in 阅读全文
posted @ 2022-09-01 16:06
liang302
阅读(34)
评论(0)
推荐(0)

浙公网安备 33010602011771号