If m [ a + b ] = c , then add c to the current sum .
if ( map . ContainsKey ( prefix_sum [ i ] + 1 ) ) sum += map [ prefix_sum [ i ] + 1 ] ; if ( map . ContainsKey ( prefix_sum [ i ] - 1 ) ) sum += map [ prefix_sum [ i ] - 1 ] ;