Showing 3 questions
You're given your initial points and information about multiple enemy battles. Each battle can increase or decrease your points. Determine the maximum points you can have after strategically fighting a subset of the enemies.
#1. Maximum Points After Enemy Battles
Given an array, you can remove all occurrences of a single element. Find the maximum possible sum of a subarray after performing this removal.
#2. Maximize Subarray Sum After Removing All Occurrences of One Element
You're given the starting and target positions of multiple pieces on a grid. Find the sum of Manhattan distances for every possible arrangement of moving the pieces from their starting to target positions.
#3. Manhattan Distances of All Arrangements of Pieces