摘要: 大致题意:给定一个字符串,从任意位置把它切为两半,得到两条子串.定义 子串1为s1,子串2为s2,子串1的反串为s3,子串2的反串为s4.现在从s1 s2 s3 s4中任意取出两个串组合,问有多少种不同的组合方法.这个题虽然分类是STL,但用STL肯定超时!!我用的是二叉查找树,比map好使多了,2... 阅读全文
posted @ 2013-09-18 19:58 、小呆 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 这个题是对STL中Map的使用考察。记录一下代码:#include #include #include #include using namespace std;int main(){ char s[100]; while(scanf("%s",s),s[0]!='*') { ... 阅读全文
posted @ 2013-09-18 09:15 、小呆 阅读(83) 评论(0) 推荐(0) 编辑