/* 很简单 模式匹配的Brute-Force算法 Brute-Force算法实现模式匹配的思想是:从主串s=”s0s1…sn-1”的第一个字符开始和模式串t=”t0t1…tn-1”的第一个字符比较,若相等,则继续比较后续字符:否则从主串s的第二个字符开始重新与模式串t的第一个字符比较.如此不断继续,若存在模式串中的每个字符依次和主串中的一个连续字符序列相等,则匹配成功,返回模式串t的第一个字符在主串中的下标:否则匹配失败,返回-1. */ #include<stdio.h>#include&…