shows[i] = [start, end, value] runs from day start through day end inclusive, and you rate it value.
You may attend at most two shows, and they must not share a single day: if one show ends on day t, the other may start on day t + 1 at the earliest.
Return the largest total rating you can collect.shows=[[2, 4, 5], [5, 9, 3], [3, 7, 7]] → 8
Shows 0 and 1 do not overlap: the first ends on day 4 and the second starts on day 5. Together they give 5 + 3 = 8, more than show 2 alone at 7.
shows=[[1, 6, 4], [6, 8, 4], [2, 9, 10]] → 10
The first two shows share day 6, so you cannot attend both. The best plan is show 2 alone, worth 10.
shows=[[10, 10, 1], [1, 3, 2], [4, 9, 6]] → 8
shows=[[2, 4, 5], [5, 9, 3], [3, 7, 7]]
8
Run checks the first 3 tests in your browser. Submit checks all 93 tests on the server, hidden ones included.