--- title: "解码" created: 2025-11-28 tags: - 算法 --- # 解码 ## 题目 [解码](https://www.acwing.com/problem/content/description/2068/) ![[image-c52a87b5.png]] ## 思路分析 如果当前位置是字符x 直接输出x 如果当前位置是数字n 输出n-1个上一个字符 没必要真在字符串里操作 这居然是蓝桥杯第二题……当时好水啊 现在好像不好混了 唉 ## 代码实现 ```cpp #include using namespace std; string s; int main() { cin>>s; char last; for(int i=0;i