摘要: 链接:https://www.luogu.com.cn/problem/P2341 题目: 思路: tarjan缩点:把所有强连通分量缩成一个点,然后统计出度为0的缩点,如果只有一个,那么能成为明星的数量就是该缩点扩充后的个数;如果不止一个,那就是0. 代码: 额,就是不知道为什么debug了两节课 阅读全文
posted @ 2024-05-09 11:46 WHUStar 阅读(17) 评论(0) 推荐(0)
摘要: Tarjan模板 #include<iostream> #include<vector> #include<algorithm> #include<math.h> #include<sstream> #include<string> #include<string.h> #include<ioman 阅读全文
posted @ 2024-05-09 09:57 WHUStar 阅读(40) 评论(0) 推荐(0)
摘要: https://www.luogu.com.cn/problem/P3388 求割点模板 #include<iostream> #include<vector> #include<algorithm> #include<math.h> #include<sstream> #include<strin 阅读全文
posted @ 2024-05-09 09:28 WHUStar 阅读(49) 评论(0) 推荐(0)