#include <iostream> #include <cstring> #include <stack> #include <cctype> #include <sstream> using namespace std; // 判斷是否為左括號 bool is_left(char c) { return c == '(' || c == '[' || c == '{'; } // 判斷是否為右括號 bool is_right(char c) { return c == ')' || c == ']' || c...