In a programming competition, each participant must develop algorithms to solve a set of problems.
The ranking is set according to the maximum number of problems solved by each participant. As a tie-breaking criterion, we adopt the total execution time of the algorithms used to solve the problems.
Implementation of a protocol that includes a size vector with the names of the participants, a respectable vector with a number of problems solved and a vector for the total execution time, indicates the winner.
Your procedure should run in T (n). Calculate the cost of your algorithm to prove that it executes in T (n).