Legal or Not Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5906 Accepted Submission(s): 2734 Problem Description ACM-DIY is a large QQ group where many excellent acmers get together. It is…
重边这样的东西 仅仅能呵呵 就是裸裸的拓扑排序 假设恩可以排出来就YES . else NO 仅仅须要所有搜一遍就好了 #include <cstdio> #include <cstring> int mapp[101][101]; int d[101]; int n,m; int a,b; int main() { while(scanf("%d%d",&n,&m)!=EOF) { if(n==0)break; memset(d,0,si…
题意:给出n,m,人的编号为 0到n-1,再给出m个关系,问能不能够进行拓扑排序 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int indegree[1005],queue[1005],head[1005]; struct Edge { int to; int next; } edge[1005]; int ma…
Legal or Not Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5885 Accepted Submission(s): 2726 Problem Description ACM-DIY is a large QQ group where many excellent acmers get together. It is…
Legal or Not Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11382 Accepted Submission(s): 5346 Problem Description ACM-DIY is a large QQ group where many excellent acmers get together. It is…
Legal or Not Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6580 Accepted Submission(s): 3088 Problem Description ACM-DIY is a large QQ group where many excellent acmers get together. It is…