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 |
原因呢 ? 我的也是这样!! 那位解释一下或 举个反例??In Reply To:原来是搞错了这题的逻辑 Posted by:schindlerlee at 2008-08-10 10:51:14 > 我就觉得照搬2492的程序怎么还会出错 > 原来我认为是两个人有一个任何以没有对立的人时 > 输出not sure,其他的进行判断 > 原来时两人祖先相等时输出same,和对立相等时输出different > 其他输出not sure > 逻辑时这样的才对 > > fa=find_set(a); > fb=find_set(b); > if(fa==fb) > printf("In the same gang.\n"); > else if(fa==find_set(opp[fb])) > printf("In different gangs.\n"); > else > printf("Not sure yet.\n"); Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator