class Solution { public: bool isValid(string s) { // write code here stack<char>st; int n=s.size(); map<char,char>mp={{'(',')'},{'{','}'},{'[',']'}}; //用map(STL库函数)来一一比较括号; for(int i=0;i<n;i++){ if(!st.empty()&&mp[st.top...