ROSECODE 153
Hint for 152
If we apply the permutation P with index I (in lexicographic order) to the string S for the following values:
I = 366899275
S = "-EHILNOOSTTU"
we get
P = {10,3,2,1,9,7,5,12,11,4,8,6}
=> "THE-SOLUTION" (Take the 10th char, then the 3rd, ... in 1-based origin)
Apply the permutation P with index I to the string S for the following values:
I = 60449125275954117495792271813111202393999762409875012980385044815846361032595450296127862666721532739781384807770642238
S = "-------------AAABBBDEEEEEEEEFHHIILLLLLLMMNNNNOOOOOOOOOOPPPRRRSSSSSSTTTTTTTUUVWYY"
and you'll get a good lead to solve problem 152.
Answer format: the string.
I = 366899275
S = "-EHILNOOSTTU"
we get
P = {10,3,2,1,9,7,5,12,11,4,8,6}
=> "THE-SOLUTION" (Take the 10th char, then the 3rd, ... in 1-based origin)
Apply the permutation P with index I to the string S for the following values:
I = 60449125275954117495792271813111202393999762409875012980385044815846361032595450296127862666721532739781384807770642238
S = "-------------AAABBBDEEEEEEEEFHHIILLLLLLMMNNNNOOOOOOOOOOPPPRRRSSSSSSTTTTTTTUUVWYY"
and you'll get a good lead to solve problem 152.
Answer format: the string.