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 whenmary at 2008-08-08 15:58:25 on Problem 2513
trie+并查集+欧拉通路
trie只是为了存每个颜色的编号,倒是没有用hash,貌似超时?长度只有10,应该还是trie吧
每新加一个棍子就把它的2种颜色并起来
possible的情况只有一种:每个颜色都在一个集合(每个棍子之间都有关系)并且存在欧拉通路(如果

颜色i出现a[i]次,那么a[i]中的元素为奇数的只能是0或2个)
那个空输入啊。。。我倒是没有特别处理就过了,貌似输出possible

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