We assume the final score of this semester is scored by midterm I, midterm II and final exam.
Each exam worth 100 points, so there is 300 points in total.
There are n students in this class, and their student ID are counted from 1 to n.
This problem is sort the students according to the following rules.
1. sort them by 0.3*(midterm I)+0.3*(midterm II)+0.4*(final exam)
2. If there are two students which get same order in rule 1, the one with more final exam scores would get higher order.
3. If there are two students which get same order in rule 2, the one with less student ID would get higher order.
In this problem, you are asked to implement a function that compares two students
The first line contains a integer n.
There are n lines following, each contains the score of midterm I, midterm II and final exam.
Line i of the n lines represent the score of student whose ID is i.
Print the order of the students in terms of student ID.