Find pairs having sum greater than zero
while ( p >= 0 and q >= 0 ) : NEW_LINE INDENT if ( a [ p ] + b [ q ] > 0 ) : NEW_LINE INDENT s = s + a [ p ] + b [ q ] NEW_LINE DEDENT else : NEW_LINE INDENT break NEW_LINE DEDENT p = p - 1 NEW_LINE q = q - 1 NEW_LINE DEDENT return s NEW_LINE