Stone Game

medium
https://leetcode.com/problems/stone-game-vii/

Input Format

Check the link

Output Format

Check the link

Constraints

Check the link

Example

Input

        
Output

        
Previous
Maximum Alternating Subsequence Sum

Related Questions