Each contiguous segment of tanks scores its length times its best tank. Add up the scores of every segment, fast.
Each contiguous segment of tanks scores its length times its best tank. Add up the scores of every segment, fast.
Unlock the full question, the code runner with test cases, and reference solution
One-time unlock. Yours forever.
Or get a for every question, unlimited code runs and AI mock interviews.
Opens with the full question.