Problem 3392 · Easy

Count Subarrays of Length Three With a Condition

Slide a window of three across the array and count the windows where the outer pair sums to half the middle value.

Open the interactive visualisation