
There are n different online courses numbered from 1 to n . You are given an array courses where courses[i] = [duration _i , lastDay _i ] indicate that the i ^th course should be taken continuously for duration _i days and must be finished before or on lastDay _i .
You will start on the 1 ^st day and you cannot take two or more courses simultaneously.
Return the maximum number of courses that you can take .
1 <= courses.length <= 10 ^41 <= duration _i , lastDay _i <= 10 ^4