首页 > TAG信息列表 > ARC136

ARC136 Flip Cells 题解

\(\newcommand{e}{\mathrm{e}}\) 链接 没有数学基础,不保证讲解严谨性。 根据套路,设 \([x^t]\hat F(x)\) 为 \(t\) 时刻在终点的概率 EGF,\([x^t]\hat G(x)\) 为从终点走 \(t\) 步回到终点的概率 EGF,并将 \(\hat F, \hat G\) 转回 OGF \(F, G\)(\(\e^{px} \to \dfrac{1}{1-px}\)),因为

[Atcoder] ARC136

A - A ↔ BB 题意 给出一串由A,B,C组成的字符串,遇到以下两种情况时 当出现A时,将A替换为BB 当出现BB时,将BB替换为A 思路 直接用stack来模拟 代码 #include<bits/stdc++.h> using namespace std; const int N = 2e6; char str[N], ans[N]; stack<char> stk; int main(){ int N; c