For the scope of this problem, an indeterministic expression refers to an expression with no fixed value, but with uncertainties. Such uncertainties are caused by variables with unknown values. Examples of deterministic expression: 2*3*5*. q+q+q+q+q+q Formally, the grammar describing a valid indeterministic expression is as below: E::=E'+'T|E'-'T|T
For the scope of this problem, an indeterministic expression refers to an expression with no fixed value, but with uncertainties. Such uncertainties are caused by variables (i.e., symbols) with unknown values. Examples of deterministic expression: 2*3*5*(7+11) 2022+5-14 998244353 Examples of indeterministic expression: a+b x*233+42 (x+y)*(z-1) q+q+q+q+q+q Formally, the grammar describing a valid indeterministic expression is as below: E ::= E '+' T | E '-' T | T T ::= T '*' F | F F ::= '(' E ')' | S | N Here, S stands for symbol, which is a single lower-case Latin letter (a-z). N stands for numeric literal, which is one or several digits, without leading sign (+ or -) or leading zero. Operations have standard priority. Multiply has the higher priority than plus and minus. Operations are left associative. Please also note that divide (/) is not supported for the scope of this problem.

标签: HBC243984ZeldainGardenIndeterministic Expression题解