Given a string containing only '(' and ')', return the length of the longest valid (well-formed) parentheses substring.
Input: A quoted parentheses string.
Output: Integer — length of longest valid substring.
Input: "(()"
Output: 2
Explanation: '()' has length 2.Input: ")()())"
Output: 4
Explanation: '()()' has length 4.Input: ""
Output: 0
Explanation: Empty string.0<=s.length<=3*10^4