find longest valid parentheses
restore IP addresses
C/C++ tricks