This is a editorial of the problem Easy Subarray Sum from codechef starters 149

This is a pretty easy and interesting problem. The key idea of the problem is you need to find where the first positive starts and where the last positive integer ends. The answer will be the count of negative numbers in that range.