#include <iostream> #include <string> #include <stack> #include <algorithm> using namespace std; // 统一括号类型 + 计算优先级 + 核心运算 int calc(string s) { // 替换所有括号为小括号 replace(s.begin(), s.end(), '[', '('); replace(s.begin(), s.end(), ']', ')'); replace(s.begin(), s.end(), '{', '('); re...