#include <bits/stdc++.h> using namespace std; // 定义运算符优先级 unordered_map<char, int> pri = { {'+', 0}, {'-', 0}, {'*', 1}, {'/', 1} }; // 计算过程: ops栈弹出运算符,nums栈弹出两个元素进行计算 void cal(vector<int>& nums, vector<char>& ops) { int b = nums.back(); nums.pop_back(); int a = nums....