ZOJ2599:Graduated Lexicographical Ordering(非常经典的数位DP)
Considerintegernumbersfrom1ton.Letuscallthesumofdigitsofanintegernumberitsweight.Denotetheweightofthenumberxasw(x).Nowletusorderthenumbersusingsocalled graduatedlexicographicalordering,orshortergrlexo