We are playing a game with n levels and can get 1 or 2 stars in each level. For the ith level, we need ti,1 and ti,2 time respectively to get 1 or 2 starts. We can also choose not to play at the level and get 0 star. It is required that we get at least m stars in the end. We want to find the minimum time to complete the game.
What is the greedy approach to this problem?