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 Necs at 2012-10-13 00:08:10 on Problem 1182
wa了很多次,看了网上的代码和我的思路都不同。最后发现是因为一组数据的问题。。
我真想说fxxk。 
提供一下我的思路,应该比较好理解:每个点除了并查集外记录一个被他吃的和吃他的集合,记为op[i][2]和op[i][3],判断时候模拟实际,而在合并时候,要将他吃的和吃他的集合同时更新。
虽然代码长些,但是思路还是很清楚的。
代码在http://hi.baidu.com/necsinmyway/item/6970b1ebfb0cac0c585dd894

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