Problem Setter: @twinklesharma
Contest Organizer: Robotics Club, MMMUT
Reducing the Problem Statement : By reading the problem you can understand that it is simply asking to sort the given data according to given condition.
Approach:- FIrst of all sort the data according to timestamp and now the problem will reduce to workaround with pairs instead of tuples.
Now apply some hashing technique to store the total score of a user and also find the maximum of those scores, afterthen simply iterate over all users and check whether their total scores is equal to that maximum score, if no! then this user is certainly not the winner hence move to next iteration, if yes! then it can be the winner now keep track of all these users, and terminate the iteration when score of any user becomes equal to maximum user, it means that this one is the winner.
Algorithmic Approach:- Algorithm is pretty straight forward first of all use pair of vectors to store data and then sort it according to first element(timestamp) and store user with his total score in map (for hashing), and then find maximum score using loop on that map.
Now the final step is to filter out all the user with maximum score and terminate loop when found any one.