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

帮忙看看我这个想法对不对啊

Posted by Iambitious at 2006-10-23 16:22:28 on Problem 1182
总共有三种动物,定义same[](并查集操作)表示x,y是否为同一类,eat[i]表示i能够吃得动物的集合,eaten[i]表示能够吃i的集合,根据输入按照d=1 x y合并x,y ;eat[x], eat[y]; eaten[x], eaten[y];按照d=2 x y合并eat[x],y;
x, eaten[y];eaten[x], eat[y]如此下去,每次先判断是否与以前的话冲突。

请问这个想法有没有问题啊,总是wa。thanks!

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