Arrays to store prefix sums , suffix and MAX 's node respectively
pref = [ 0 for i in range ( 500005 ) ] NEW_LINE suf = [ 0 for i in range ( 500005 ) ] NEW_LINE MAX = [ 0 for i in range ( 500005 ) ] NEW_LINE