#include
#include
void main()
{
char s1[1000],s2[100],b[100];
int i,j,k,len1,len2;
gets(s1);
gets(s2);
len1=strlen(s1);
len2=strlen(s2);
for(i=0,k=0;i
{
for(j=0;j
if(s1[i+j]!=s2[j])break;...
分类:
其他好文 时间:
2014-07-12 23:41:03
阅读次数:
195
1.char类型字段会自动删除字符串后面所带的空格,而varchar不会2.char比varchar快.....3.myisam 建议 char类型,memory char跟varchar一样,都作为char类型处理;innodb建议 varchar类型4.optimize table 清理碎片te...
分类:
数据库 时间:
2014-07-08 00:49:22
阅读次数:
422
输入:字符串只包含小写英文字母,不考虑非法输入,输入的字符串长度小于等于20个字节。输出:删除字符串中出现次数最少的字符后的字符串。样例输入:abcdd 样例输出:dd#include#include#include#includeusing namespace ...
分类:
其他好文 时间:
2014-07-07 10:44:01
阅读次数:
163
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 string s1, s2; 6 getline(cin, s1); 7 getline(cin, s2); 8 while(s1.find(s...
分类:
其他好文 时间:
2014-07-02 17:17:29
阅读次数:
281
题目链接:点击打开链接
给定n个操作,m长的序列a
下面n个数
if(co>=0)则向字符串添加一个co (开始是空字符串)
else 删除字符串中有a的下标的字符
直接在序列上搞,简单模拟
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using na...
分类:
其他好文 时间:
2014-06-26 07:52:58
阅读次数:
226
#include
#include
using std::cout;
using std::endl;
using std::cin;
using std::string;
int main(void){
string str1="We can insert a string";
string str2="a str into ";
//在字符串指定位置...
分类:
编程语言 时间:
2014-06-15 19:29:30
阅读次数:
251
输入2个字符串S1和S2,要求删除字符串S1中出现的所有子串S2,即结果字符串中不能包含S2。
输入格式:
输入在2行中分别给出不超过80个字符长度的、以回车结束的2个非空字符串,对应S1和S2。
输出格式:
在一行中输出删除字符串S1中出现的所有子串S2后的结果字符串。
输入样例:
Tomcat is a male ccatat
cat
输出样例:
Tom ...
分类:
其他好文 时间:
2014-06-13 21:44:07
阅读次数:
293