Single File Programming Question
Savitha is given n triangles and the lengths of their sides. She has to print them in the same style but sort them by area, from the smallest to the largest using structure. It is guaranteed that all the areas are different.
Help her to complete the task.
Input format :
The first line of each test contains a single integer n.
Then n lines follow with ai bi ci, and on each is separated by single spaces.
Output format :
The output prints n lines exactly.
On each line, print 3 integers separated by single spaces, which are the ai bi ci of the corresponding triangle.
Refer to the sample output for formatting specifications.
Sample test cases :
Input 1 :
3 10 20 26 8 19 23 5 10 15
Output 1 :
5 10 15 8 19 23 10 20 26
Input 2 :
3 7 24 25 5 12 13 3 4 5
Output 2 :
3 4 5 5 12 13 7 24 25 Whitelist Set 1: struct