The repository that contains all solutions made for the course Competitive Programming and Contests by the University of Pisa
Solved | Solution | Time |
---|---|---|
Sorting | > 1500 ms (TLE) |
The solution to this problem sort the input array and use an additional array to store the team’s couple possible, according to their strength.
After that, the algorithms form the teams starting from the highest strength to the lowest.
The time complexity of this solution is O (N log N) and the space complexity is O(N).