1. 程式人生 > >【hdu5883】【尤拉路】 每個點都有權值,要求按照尤拉路或者通路走一遍是的使得權值異或值最大

【hdu5883】【尤拉路】 每個點都有權值,要求按照尤拉路或者通路走一遍是的使得權值異或值最大

Alice is planning her travel route in a beautiful valley. In this valley, there are N lakes, and M rivers linking these lakes. Alice wants to start her trip from one lake, and enjoys the landscape by boat. That means she need to set up a path which go through every river exactly once. In addition, Alice has a specific number (a1,a2,...,an) for each lake. If the path she finds is P
0
P1...Pt
, the lucky number of this trip would be aP0XORaP1XOR...XORaPt. She want to make this number as large as possible. Can you help her?