1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 15:31:43 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

更新国内版力扣题目描述变更

This commit is contained in:
2022-05-02 23:42:43 +08:00
parent 74598d1cf8
commit 7ea03594b3
198 changed files with 11378 additions and 11118 deletions

View File

@@ -1,25 +1,25 @@
<p>Given a boolean expression consisting of the symbols <code>0</code> (false), <code>1</code> (true), <code>&amp;</code> (AND), <code>|</code> (OR), and <code>^</code>&nbsp;(XOR), and a desired boolean result value result, implement a function to count the number of ways of parenthesizing the expression such that it evaluates to result.</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input: </strong>s = &quot;1^0|0|1&quot;, result = 0
<strong>Output: </strong>2
<strong>Explanation:</strong>&nbsp;Two possible parenthesizing ways are:
1^(0|(0|1))
1^((0|0)|1)
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input: </strong>s = &quot;0&amp;0&amp;0&amp;1^1|0&quot;, result = 1
<strong>Output: </strong>10</pre>
<p><strong>Note: </strong></p>
<ul>
<li>There are no more than&nbsp;19 operators in <code>s</code>.</li>
</ul>
<p>Given a boolean expression consisting of the symbols <code>0</code> (false), <code>1</code> (true), <code>&amp;</code> (AND), <code>|</code> (OR), and <code>^</code>&nbsp;(XOR), and a desired boolean result value result, implement a function to count the number of ways of parenthesizing the expression such that it evaluates to result.</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input: </strong>s = &quot;1^0|0|1&quot;, result = 0
<strong>Output: </strong>2
<strong>Explanation:</strong>&nbsp;Two possible parenthesizing ways are:
1^(0|(0|1))
1^((0|0)|1)
</pre>