摘要: View Code 1 #include<iostream> 2 #include<cstdio> 3 #include<cstdlib> 4 #include<cstring> 5 #include<stack> 6 using namespace std; 7 8 char ch[1000]; 9 stack <int> q;10 11 void slovenum()12 {13 int i,len;14 while(!q.empty())q.pop();15 int x=0;16 len=strlen(ch);17 阅读全文
posted @ 2012-05-01 17:45 知行执行 阅读(151) 评论(0) 推荐(0) 编辑
摘要: View Code 1 /* 2 注意: 3 题非常简单,读题有误 4 不是求最长回文子串 5 而是求 原串的一个子串 ,这个子串反转后还是原串的子串 6 相当于求原串和他的反转串 的最长公共子序列(连续) 7 */ 8 9 #include<iostream>10 #include<cstdio>11 #include<cstdlib>12 #include<cstring>13 using namespace std;14 15 char ch[60];16 char tc[60];17 18 int main()19 {20 int i,j 阅读全文
posted @ 2012-05-01 16:29 知行执行 阅读(184) 评论(0) 推荐(0) 编辑