Vitaly and Advanced Useless Algorithms solution codeforces – The course consists of nn tasks. Vitaly calculated that he has aiai hours to do the task ii from the day he enrolled in the course. That is, the deadline before the ii-th task is aiai hours. The array aa is sorted in ascending order, in other words, the job numbers correspond to the order in which the assignments are turned in.

Vitaly and Advanced Useless Algorithms solution codeforces Vitaly enrolled in the course Advanced Useless Algorithms. The course consists of nn tasks. Vitaly calculated that he has aiai hours to do the task ii from the day he enrolled in the course. That is, the deadline before the ii-th task is aiai hours. The array aa is sorted in ascending order, in other words, the job numbers … Read more