| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
同样的错误我也犯了一次,贡献了一次WAIn Reply To:Re:终于AC,WA了两次啊,罪过罪过 Posted by:zouyuanrenren at 2006-04-13 23:51:00 //0 represent circle
//-1 represent not order
(1)if (cnt < n) return 0;
(2)if (flag==-1) return -1;
(3)return 1;
把第一句和第二句的顺序颠倒一下就AC了,也就是说在拓扑不唯一时需要先判断是否有环
这组数据很经典
4 4
A<B
C<B
D<B
B<A
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator