# # # @param s string字符串 # @return int整型 # class Solution: def longestValidParentheses(self , s ): # write code here res,left,right = 0,0,0 for c in s: if c == '(': left += 1 else : right += 1 if right==left: res = max(res,right*2) if right > left: left,right = 0,0 left,right = 0,0 for c in s[::-...