题解:P17088 轻舟已过
Monotonic_Deque · · 题解
我们发现题目其实就是使一个
接着我们注意到在
这样我们只要输出
代码:
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0), cin.tie(0);
int n;
cin >> n;
cout << (1ll << n) - (1ll << n / 2);
return 0;
}