题意+思路 见前一博文
#include <stdio.h>
#include <string.h>
#define VM 1005
#define EM 6005
struct E
{
int
to,next;
}edge[EM];
struct E1
{
int
frm,to,next;
}edge1[EM];
int head[VM],head1[VM],indeg[VM],map[VM][VM];
int dfn[VM],low[VM],vis[VM],belong[VM],stack[VM];
int scc,cnt,top,p,n;
void addedge (int cu,int cv)
{
edge[p].to =
cv;
edge[p].next
= head[cu];
head[cu] =
p++;
}
void addedge1(int cu,int cv)
{
edge1[p].frm
= cu;
edge1[p].to
= cv;
e......
阅读全文