摘要: using namespace std; #include <iostream> #include<string> //自定义字符串存储结构String(包括char数组、length长度) #define maxlen 20 typedef struct { char ch[maxlen]; in 阅读全文
posted @ 2021-06-18 19:10 输了怪队友 阅读(45) 评论(0) 推荐(0) 编辑
摘要: using namespace std; #include <iostream> #include<string> //第1种,用string自带的s.subdtr()截取任意子串,再用s.compare()确定是否与待求子串相等,时间复杂度O(len1*len2) int index1(strin 阅读全文
posted @ 2021-06-18 18:46 输了怪队友 阅读(272) 评论(0) 推荐(0) 编辑