博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
UVA 12167 Proving Equivalences 强连通分量
阅读量:6902 次
发布时间:2019-06-27

本文共 1183 字,大约阅读时间需要 3 分钟。

//#pragma comment(linker, "/STACK:1024000000,1024000000")#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair
pii;#define pb(a) push(a)#define INF 0x1f1f1f1f#define lson idx<<1,l,mid#define rson idx<<1|1,mid+1,r#define PI 3.1415926535898template
T min(const T& a,const T& b,const T& c) { return min(min(a,b),min(a,c));}template
T max(const T& a,const T& b,const T& c) { return max(max(a,b),max(a,c));}void debug() {#ifdef ONLINE_JUDGE#else freopen("d:\\in1.txt","r",stdin); freopen("d:\\out1.txt","w",stdout);#endif}int getch() { int ch; while((ch=getchar())!=EOF) { if(ch!=' '&&ch!='\n')return ch; } return EOF;}struct Edge{ int u,v;};const int maxn=20005;int pre[maxn],lowlink[maxn],sccno[maxn];int dfs_clock,scc_cnt;vector
g[maxn],scc[maxn];stack
s;void dfs(int u,int fa){ lowlink[u]=pre[u]=++dfs_clock; s.push(u); for(int i=0;i
View Code

 

转载于:https://www.cnblogs.com/BMan/p/3612606.html

你可能感兴趣的文章
算法的时间复杂度详解
查看>>
制作3D旋转视频展示区
查看>>
Spring.Net初认识——竹子整理
查看>>
win7 下 vmware 虚拟机开后 w字母键失效不能用 解决方案:
查看>>
[网络流24题-8]汽车加油行驶问题
查看>>
Vim使用技巧(2) -- 插入模式技巧 【持续更新】
查看>>
Spring MVC+Fastjson之时间类型序列化
查看>>
【ospf-路由过滤】
查看>>
进阶: 案例八: Drag and Drop(动态)
查看>>
Remove Duplicates from Sorted List II
查看>>
Python中else的用法
查看>>
蓝桥杯 迷宫
查看>>
多行截断
查看>>
完成个人中心 导航标签
查看>>
使用位生成子集
查看>>
需求分析--12章 过程建模
查看>>
C#运用实例.读取csv里面的词条,对每一个词条抓取百度百科相关资料,然后存取到数据库...
查看>>
css3选择器
查看>>
nginx虚拟主机配置
查看>>
PYthon基础
查看>>