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:Re:谁能说一下这题的思路!!!!! Posted by:ACMaryland at 2008-08-09 15:21:06 > 构图,对于任何一个数a,去掉首位,再补上一个尾位,可以得到两个新数b和c,ab,ac各连一条边, 然后求字典序最小的欧拉回路,如POJ1041。 这个构图好像不是要找欧拉回路,而是要找哈密尔顿回路。 不过构完图后只要依照最小字典序找到那条长度为2^n的链就行了。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator