随笔分类 -  +字符串

摘要:具体思路已经在代码注释中给出,这里不再赘述。 #include<iostream> #include<algorithm> using namespace std; int t; string s; int main() { cin >> t; while(t--) { cin >> s; int 阅读全文
posted @ 2020-06-01 11:26 DIY-Z 阅读(179) 评论(0) 推荐(0)
摘要:t是模式串,s是需要被匹配的串。 阅读全文
posted @ 2019-10-08 17:34 DIY-Z 阅读(120) 评论(0) 推荐(0)
摘要:题意分析 1.题目大致说的是让你输出符合这种条件(在所给的字符串中至少有一个不是它的子串)的字符串对应的label,若没有输出 1; 2.判断子串可以用string.h下的strstr(s1, s2)函数,若s2 是s1的子串则返回在s1中s2首字母对应的地址,若不是则返回NULL,想进一步了解st 阅读全文
posted @ 2019-09-05 23:15 DIY-Z 阅读(250) 评论(0) 推荐(0)