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 644197852 at 2015-03-27 14:11:42 on Problem 2337 and last updated at 2015-03-27 14:26:17
      之前也没写过输出欧拉路径啥的啊!看有人说可以用栈递归存边,然后就在纸上
画了几个8想想,觉得有道理,就自己写了一个欧拉路的(其实很简单),至于排序的地
方,我想的是直接在存边之前先把边排序下,因为欧拉路径输出的时候也是比较简
单“画6的感觉”,要求字典序最小,因为我用的是前向星,其实这个东西建边是倒叙
的,就是a-b a-c a-d 的顺序进去,那么访问的时候是a-d,a-c,a-b这样的,全都是抱着
试一试,结果直接a了。虽然是简单题,但是挺高兴啊。

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