摘要: 题目描述 Ali has taken the Computer Organization and Architecture course this term. He learned that there may be dependence between instructions, like WAR 阅读全文
posted @ 2020-05-01 18:37 liuchanglc 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 确定比赛名次 题目大意 有N个比赛队(1 Sample Input 4 3 1 2 2 3 4 3 Sample Output 1 2 4 3 分析 比较裸的拓扑排序的题,唯一需要考虑的就是输出的顺序 不过这个也不难,用一个优先队列存一下就可以了 代码 cpp include include inc 阅读全文
posted @ 2020-05-01 17:07 liuchanglc 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Electricity POJ - 2117 题目描述 Blackouts and Dark Nights (also known as ACM++) is a company that provides electricity. The company owns several power pla 阅读全文
posted @ 2020-05-01 16:29 liuchanglc 阅读(190) 评论(0) 推荐(0) 编辑
摘要: //Tarjan求割点 void tarjan(int now,int fa){ int num=0; low[now]=dfn[now]=++dfnc; for(int i=head[now];i!=-1;i=b[i].next){ int u=b[i].to; if(!dfn[u]){ tarj 阅读全文
posted @ 2020-05-01 11:14 liuchanglc 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Caocao was defeated by Zhuge Liang and Zhou Yu in the battle of Chibi. But he wouldn't give up. Caocao's army still was not good at water battles 阅读全文
posted @ 2020-05-01 10:37 liuchanglc 阅读(262) 评论(0) 推荐(0) 编辑
摘要: //Tarjan求桥 void tarjan(int now,int id){ dfn[now]=low[now]=++dfnc; for(int i=head[now];i!=-1;i=b[i].next){ if(i==(id^1)) continue; int u=b[i].to; if(!d 阅读全文
posted @ 2020-05-01 10:25 liuchanglc 阅读(179) 评论(0) 推荐(0) 编辑
摘要: //Tarjan求强连通分量 void tarjan(int now){ dfn[now]=low[now]=++dfnc; sta[++top]=now; for(int i=head[now];i!=-1;i=b[i].next){ int u=b[i].to; if(!dfn[u]){ tar 阅读全文
posted @ 2020-05-01 10:15 liuchanglc 阅读(154) 评论(0) 推荐(0) 编辑