U517656 「Cfz Round 5」Non-breath Oblige (English)
题目背景
[Chinese Statement](https://www.luogu.com.cn/problem/P11485). **You must submit your code at the Chinese version of the statement.**
---
それぞれの好きを守るため
To protect our respective beloved ones,
君と防空壕で呼吸する
We breathe together in the air-raid shelter.
题目描述
Given three integers $n, s, t$, where $0 \le s, t < 2^n$.
You can perform several operations. In each operation, you can choose a non-negative integer $x$ and modify the value of $s$ to $x$, subject to the following conditions:
- It must satisfy $x < 2^n$;
- It must satisfy $s \cup x = 2^n - 1$, where $\cup$ denotes the bitwise OR operation;
- The cost you need to pay is $s \oplus x$, where $\oplus$ denotes the bitwise XOR operation.
You need to find the minimum sum of costs required to make $s = t$.
输入格式
无
输出格式
无
说明/提示
#### Sample Explanation #1
For the first test case, since $1 \cup 2 = 3$, you can directly change the value of $s$ from $1$ to $2$, with a cost of $1 \oplus 2$, which is $3$. It can be proven that the minimum sum of costs required to make $s = t$ is $3$.
For the second test case, no operation is needed to satisfy $s = t$.
#### Constraints
For all test cases, it is guaranteed that:
- $1 \le T \le 100$;
- $1 \le n \le 30$;
- $0 \le s, t < 2^n$.
**Subtasks are used in this task.**
- Subtask 0 (12 points): $s = t$.
- Subtask 1 (15 points): $n = 1$.
- Subtask 2 (20 points): $s + t = 2^n - 1$.
- Subtask 3 (10 points): $t = 2^n - 1$.
- Subtask 4 (18 points): $t = 0$.
- Subtask 5 (25 points): No further restrictions.