Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

同样的错误我也犯了一次,贡献了一次WA

Posted by openthedoor at 2008-07-11 02:12:16 on Problem 1094
In 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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator