two sliding window. python easy solution.
Code
# Code
```python3 []
class Solution:
    def maximumCoins(self, coins: List[List[int]], k: int) -> int:
        def slide():
            ans = covers = 0
            left = 0 # left index. use for removal
            for l,r,c in coins:
                covers += (r-l+1)*c # in
                while coins[left][1] <= r-k: # out
                    l2,r2,c2 = coins[left]
                    covers -= (r2-l2+1)*c2
                    left += 1
                l2,r2,c2=coins[left]
                uncover = max((r-k+1-l2)*c2,0) # partially uncover region removal
                # uncover is used because we don't want to subtract twice.
                ans = max(ans, covers-uncover) # update

            return ans
        coins.sort()
        right_best = slide() # search all right endpoint
        coins = [(-r,-l,c) for l,r,c in coins[::-1]] # mirror about origin
        left_best = slide() # search all left end point (because of mirror)
        return max(left_best, right_best)
```
['Python3']