[Video Solution] Very Similar Problem on Codeforces
Very similar (kinda same) problem on Codeforces : https://codeforces.com/problemset/problem/1552/F\n\nAnd Amazing Video Solution (Not mine but really great) :: 
Very similar (kinda same) problem on Codeforces : https://codeforces.com/problemset/problem/1552/F\n\nAnd Amazing Video Solution (Not mine but really great) :: https://www.youtube.com/watch?v=_DaTsI42Wvo
['Dynamic Programming', 'Prefix Sum']