Тавсифи масъала
ElectiCode prepared special courses for his students. There are students in total, and the rating of the -th student is denoted by .
Farhod is going to teach exactly one student in each course. The process repeats exactly times:
- He chooses the student with the lowest current rating; if there are multiple such students, he selects the one with the smallest index.