+ 2

How to solve this problem

Walder Frey was introducing his daughters to Edmure Tully. Lord of Riverrun during the Red Wedding. There are N daughters that he wanted to introduce: Daughter 1, Daughter 2.... Daughter N. Daughter i lives in city Si, and Walder is giving a number (Pi) to each of his Daughter out of 100. No two Daughters have the same number. Walder Frey wants to introduce his daughters in the following order: The daughters are standing in lexicographical order of the names of their cities in which they live. If there are multiple daughters in the same city, they are arranged in descending order of the number given to them by Walder. Print the identification numbers of the daughters in the order they are introduced by the Walder to Edmure Tully

4th Feb 2021, 11:25 AM
Prashant Dhumal
Prashant Dhumal - avatar
1 Answer