代码
#include <cstdio>
#include <cctype>
#include <cstring>
#include <iostream>
#include <stack>
using namespace std;
typedef long long LL;
const int SIZE = 1010;
char str[SIZE];
stack<char> OPERATOR; // 操作符
stack<LL> OPERAND; // 操作数
inline int get_priority(char ch) {
switch (ch) {
case '(':
return 0;
case '+':
case '-':
return 1;
case '*':
case '/':
return 2;
case ')':
return 3;
}
}
inline LL calc()