摘要:
结论题:竞赛图中有环,则必存在三元环。拓扑排序判环,没什么好说的了。附代码:View Code #include <iostream>#include <string.h>#include <stdio.h>using namespace std;#define E 2002char a[E][E];int map[E][E];int count[E];bool Topsort(int n,int edge[][E]){ int i,top=-1; for(i=0;i<n;i++) if(count[i]==0) { count[i... 阅读全文