Sponsored
Use these hints if you're stuck. Try solving on your own first.
Consider every possible beauty and its first and last index in flowers.
Remove all flowers with negative beauties within those indices.
Solve with full IDE support and test cases