uva 536Tree Recovery
来源:互联网 发布:推广必备软件 编辑:程序博客网 时间:2024/04/27 01:23
#include <cstdio>#include <iostream>#include <cstring>#include <algorithm>using namespace std;void build(int n, char *s1, char *s2, char *s){ if(n <= 0) return; int p = strchr(s2, s1[0]) - s2; build(p, s1+1, s2, s); build(n-p-1, s1+p+1, s2+p+1, s+p); s[n-1] = s1[0];}int main(){ char s1[30], s2[30], ans[30]; while(scanf("%s%s", s1, s2) == 2) { int n =strlen(s1); build(n, s1, s2, ans); ans[n] = '\0'; cout << ans << endl; } return 0;}
- UVA 536 - Tree Recovery
- uva 536Tree Recovery
- uva 536 - Tree Recovery
- UVA 536 Tree Recovery
- UVA 536 Tree Recovery
- UVa, 536 Tree Recovery
- uva 536 - Tree Recovery
- UVa 536 - Tree Recovery
- UVA - 536 Tree Recovery
- UVa 536 Tree Recovery
- UVa 536 - Tree Recovery
- UVA - 536 Tree Recovery
- Uva - 536 - Tree Recovery
- Tree Recovery-UVA 536
- uva 536 - Tree Recovery
- Uva-536 Tree Recovery
- UVA - 536 Tree Recovery
- UVA 536 Tree Recovery
- 为什么使用C++(1)
- CSS的display小记
- 第十一次试验任务
- “结巴”分词:做最好的Python分词组件
- Struts 2.x 实现防止表单重复提交
- uva 536Tree Recovery
- DIV CSS display (block none inline)属性的用法教程
- 10130 - SuperSale
- Oracle Error 查看网站
- display:inline、block、inline-block的区别
- js 正则总结
- apktool+dex2jar+xjad反编译APK文件
- EKF/UKF/IMM
- 黑马训练营——多线程之创建线程