K - Count the string HDU - 3336
https://cn.vjudge.net/problem/HDU-3336
题意:求一个字符串中所有前缀在这个字符串中出现的总次数(可重叠)。
思路:利用next数组dp一遍,然后求一遍dp的总和。
#include<iostream>
#include<stdio.h>
using namespace std;
#define ll long long
#def...
原创
2018-12-26 11:41:01 ·
218 阅读 ·
0 评论