zoj 3957 Knuth-Morris-Pratt Algorithm

Ubuntu22.04如何安装cuDNN8.9.7 本文详细介绍了在Ubuntu 22.04系统上为CUDA 12.2安装适配cuDNN 8.9.7的完整流程,特别针对RTX A6000显卡。主要内容包括:1)选择与CUDA 12.2兼容的cuDNN版本;2)使用deb包方式的安装步骤(添加仓库、导入密钥、安装组件);3)通过MNIST示例验证安装;4)版本锁定、卸载旧版等补充说明;5)性能测试方法。文中强调了版本匹配的重要性,并提供了多卡配置建议,为搭建深度学习开发环境提供完整指导。 阅读详情
Knuth-Morris-Pratt Algorithm

Time Limit: 1 Second      Memory Limit: 65536 KB

In computer science, the Knuth-Morris-Pratt string searching algorithm (or KMP algorithm) searches for occurrences of a "word" W within a main "text string" S by employing the observation that when a mismatch occurs, the word itself embodies sufficient information to determine where the next match could begin, thus bypassing re-examination of previously matched characters.

Edward is a fan of mathematics. He just learnt the Knuth-Morris-Pratt algorithm and decides to give the following problem a try:

Find the total number of occurrence of the strings "cat" and "dog" in a given string s.

As Edward is not familiar with the KMP algorithm, he turns to you for help. Can you help Edward to solve this problem?

Input

There are multiple test cases. The first line of input contains an integer T (1 ≤ T ≤ 30), indicating the number of test cases. For each test case:

The first line contains a string s (1 ≤ |s| ≤ 1000).

Output

For each case, you should output one integer, indicating the total number of occurrence of "cat" and "dog" in the string.

Sample Input
7
catcatcatdogggy
docadosfascat
dogdddcat
catcatcatcatccat
dogdogdogddddooog
dcoagtcat
doogdog
Sample Output
4
1
2
5
3
1
1
Hint

For the first test case, there are 3 "cat" and 1 "dog" in the string, so the answer is 4.

For the second test case, there is only 1 "cat" and no "dog" in the string, so the answer is 1.




按题意模拟即可 ,水题。。



#include<map>
#include<set>
#include<cmath>
#include<stack>
#include<queue>
#include<vector>
#include<cstdio>
#include<string>
#include<cstring>
#include<iomanip>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int t;
	cin>>t;
	while(t--)
	{
	     string a;
	     cin>>a;
	     long long int ans=0;
         for(int i=0;i<=a.length()-3;i++)
		 {
		 	 if(a[i]=='d'&&a[i+1]=='o'&&a[i+2]=='g')ans++;
		 	 if(a[i]=='c'&&a[i+1]=='a'&&a[i+2]=='t')ans++;
		 }		 
		 cout<<ans<<endl;
	}
	return 0;
}


GStreamer中h264parse元素 h264parse是 GStreamer 中处理 H.264 视频流的关键元素,主要负责解析和准备 H.264 流以便后续处理。 阅读详情

相关推荐

ChatGPT and Claude国内使用站点

这篇博客介绍了不同的AI聊天平台和定价信息,主要对比了ChatGPT和Claude两款产品。文章列出了多个提供聊天服务的AI平台,包括RawChat、ChatGPTPlus、ChatOpens、Wildcard和2233.ai等,并提供了每个平台的网页链接和定价详情。特别关注了Claude平台,介绍了其普通账号与会员账号的不同,以及相关的定价信息。此外,还提到了一些虚拟卡定价和服务细节,为用户选择合适的AI服务提供了多种参考。

nisidjndn的博客 1万+

Knuth-Morris-Pratt算法(KMP)

Knuth-Morris-Pratt 字符串查找算法(常简称为 “KMP算法”)是在一个“主文本字符串”S 内查找一个“词”W 的出现,通过观察发现,在不匹配发生的时候这个词自身包含足够的信息来确定下一个匹配将在哪里开始,以此避免对以前匹配过的字符重新检查。 举个例子: leetcode中28. Implement strStr() 返回在haystack中第一次出现Needle的索引,如果...

Jeff_的博客 2311

下水管道损坏检测数据集总结

下水管道损坏检测数据集包含 6708 张图像,为下水管道损坏情况的检测提供了丰富的数据基础。该数据集提供了 YOLO 和 VOC 两种常见的标注方式,方便不同需求的使用者进行模型训练和研究。

crz1336768325的博客 877

KMP 算法(Knuth-Morris-Pratt)

KMP算法,全称为Knuth-Morris-Pratt算法,是一种字符串匹配算法。它的基本思想是,当出现字符串不匹配时,可以知道一部分文本内容是一定匹配的,可以利用这些信息避免重新匹配已经匹配过的文本。这种算法的时间复杂度为O(n+m),其中n是文本串的长度,m是模式串的长度,比暴力匹配算法具有更高的效率。KMP算法的核心是利用模式串本身的特点,预处理出一个next数组,用于在匹配过程中快速移动......

激流丶的博客 3621

17【Protues单片机仿真】基于51单片机的太阳能智能谷物翻晒机器人

基于51单片机,避障,低于50CM报警,LED灯亮起,自动翻晒用光敏电阻,光照强度大,电机转动,相当于翻晒粮食,远程控制用按键代替,按下去电机就转动,相当于翻晒粮食,然后光照强度和超声波的距离都在LCD1602显示屏显示出来。

weixin_70360261的博客 1452

【Out-of-Distribution Detection】Evidential Deep Learning in NeurIPS 2018 个人理解

核心思想是将分类器的概率输出视为一个狄利克雷分布(Dirichlet Distribution)并替换,之后引入两个损失分别负责保证预测结果准确性和提升被错误分类的样本的不确定性。

研究兴趣:开放集识别、开放世界识别、新类发现、增量学习、少样本学习 2442

Knuth-Morris-Pratt Algorithm

KMP背景分析普通算法(遍历),会遗忘所有之前比较过的信息,导致每一次移位,都要重新重头比较每一个字符。这将会导致 O(mn)的时间复杂度(m: 关键字符长度,n: 文本string的长度)而KMP算法,则能够保证不去重复比较已经部分匹配的字符,比如序列“abcdabac”,如果“abcd”部分匹配了文本,而在接下来的“a”位置上不匹配,那么算法则会直接跳过4个位置,重新进行比较,而不是移位1个,...

weixin_34408717的博客 222

模拟量传输4-20ma电流

大家可能会非常熟悉RS232,RS485,CAN等工业上常用的总线,他们都是传输数字信号的方式。那么,我们用什么方式来传输模拟信号呢?工业上普遍需要测量各类非电物理量,例如温度、压力、速度、角度等,这些都需要转换成模拟量电信号才能传输到几百米外的控制室或显示设备上。工业上最广泛采用的是用4~20mA电流来传输模拟量。 采用电流信号的原因是不容易受干扰,因为工业现场的噪声电压的幅度可能达到数V,但是噪声的功率很弱,所以噪声电流通常小于nA级别,因此给4-20mA传输带来的误差非常小;电流源内阻趋于无穷.

tangdongming的博客 1万+

简单的讲懂KMP算法(配图最细保姆级手把手教会!!)

KMP 算法(Knuth-Morris-Pratt 算法)是一种高效的字符串匹配算法,他比较BF算法复杂度更低但是也更难理解,它的算法非常精妙减少了BF算法(暴力算法,上一篇博客有讲解)的无用重复操作大大减少了循环次数,再加上限制条件使得它的效率更加高效,我有看到许多大神在讲KMP算法但是大部分都是理论性讲述,不易懂打退了许多学者的热情以及自信心,我将会保姆级和大家分析KMP算法的思想以及代码的实现!!!

weixin_63426509的博客 6275

Python离线断网情况下安装numpy、pandas和matplotlib等常用第三方包

联网情况下在命令终端CMD中输入“pip install numpy”即可自动安装,pandas和matplotlib同理一样方法进行自动安装。 工作的电脑不能上外网,所以不能通过直接输入pip命令来安装。 环境:电脑上已经安装了Python(没有安装的请参考其他教程)。 Python离线断网情况下安装numpy、pandas和matplotlib等常用第三方包的步骤如下: ...

dayou7738的博客 4950

Mac安装Weblogic教程

1.Weblogic的下载 这次安装的是最新版本12 官网下载地址: http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html 下载需要登录账号,如没有账号要注册一个 下载后的文件如下图,其中fmw_12.2.1.3.0_wls_quick.jar文件就是安装包了,注意现在不要对它进行解压 2.安装前的确...

weixin_40102675的博客 5068

Knuth-Morris-Pratt 算法(KMP算法)

Knuth-Morris-Pratt 算法,简称 \text{KMP}KMP 算法,由 \text{Donald Knuth}Donald Knuth、\text{James H. Morris}James H. Morris 和 \text{Vaughan Pratt}Vaughan Pratt 三人于 19771977 年联合发表。 \text{Knuth-Morris-Pratt}Knuth-Morris-Pratt 算法的核心为前缀函数,记作 \pi(i)π(i),其定义如下: 对于长度为 mm 的

lyzchengxuyuan的博客 986

【QT开发教程】使用Qt进行蓝牙低功耗(BLE)编程

蓝牙低功耗(BLE,Bluetooth Low Energy)技术广泛应用于现代设备中,例如智能手表、健身追踪器和物联网设备。Qt提供了一套完整的Bluetooth模块,使开发者可以轻松地在应用程序中实现BLE通信功能。本文将介绍如何在Qt中进行BLE编程,包括基本概念、使用方法以及一些实际的示例。

科技改变人类,技术成就未来 2874

F - Knuth-Morris-Pratt Algorithm ZOJ - 3957(KMP)

In computer science, the Knuth-Morris-Pratt string searching algorithm (or KMP algorithm) searches for occurrences of a “word” W within a main “text string” S by employing the observation that when a ...

tomjobs的博客 424

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

ZOJ 3957 Knuth-Morris-Pratt Algorithm

In computer science, the Knuth-Morris-Pratt string searching algorithm (or KMP algorithm) searches for occurrences of a “word” W within a main “text string” S by employing the observation that when a m

DorMOUSENone的博客 572

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

ZOJ 3957: Knuth-Morris-Pratt Algorithm

Knuth-Morris-Pratt Algorithm///@authorSycamore,ZJNU ///@date4/9/2017 #include<iostream> #include<sstream> #include<iomanip> #include<cmath> #include<string&gt...

weixin_30242907的博客 150

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

ZOJ - 3957 Knuth-Morris-Pratt Algorithm

#include #include #include #include #include #include #include #include #include #include #include #define PI acos(-1.0) #define in freopen("in.txt", "r", stdin) #define out freopen("out.txt", "w", st

床前明月光 290

zoj3957——Knuth-Morris-Pratt Algorithm(KMP)

In computer science, the Knuth-Morris-Pratt string searching algorithm (or KMP algorithm) searches for occurrences of a “word” W within a main “text string” S by employing the observation that when a m

Beyond the Sora 826

【ZOJ3957 The 17th Zhejiang University Programming Contest J】【水题】Knuth-Morris-Pratt Algorithm

Knuth-Morris-Pratt Algorithm Time Limit: 1 Second      Memory Limit: 65536 KB In computer science, the Knuth-Morris-Pratt string searching algorithm (or KMP algorithm) searches for occurrences

snowy_smile的博客 657

KMP算法,即Knuth-Morris-Pratt算法,是一种高效的字符串匹配算法

KMP算法通过预处理模式串生成一个"最长公共前后缀"(也称为部分匹配表或next数组),该数组用于在匹配过程中决定在不匹配的情况下模式串向右滑动的距离。:在朴素字符串匹配算法中,如果主串和模式串在某一位不匹配,则主串指针回溯到下一位,模式串从头开始匹配。部分匹配表用于记录在模式串中各个位置之前的子串的最大前缀和后缀的公共长度,通过这种方式可以有效地跳过不必要的比较,提高匹配效率。而KMP算法在匹配失败时,利用已计算的部分匹配表,将模式串向前移动至适合的位置,继续匹配,从而避免了回溯。

[Blog][Domain] programb.blog.csdn.net 1238

【数据结构与算法】Knuth-Morris-Pratt 算法(KMP算法):一种在字符串中查找子串的算法

KMP(Knuth-Morris-Pratt)算法是一个在字符串中查找子串的算法,由 Donald Knuth、Vaughan Pratt 和 James H. Morris 共同发明。这个算法的特点是在查找过程中,不会回溯主串,也不会重复扫描已经比较过的子串,因此它的时间复杂度是线性的。它的主要优点是在比对过程中,当一个字符不匹配时,可以跳过一些无需再次比对的字符,从而提高匹配效率。

HEX9CF的技术博客 1483

20200922 001_经典算法面试题1——字符串匹配之KMP算法

20200922 001_经典算法面试题1——字符串匹配之KMP算法 转载:https://blog.csdn.net/v_july_v/article/details/7041827 1. 字符串匹配问题: 1)有一个字符串 str1= "BBC ABCDAB ABCDABCDABDE",和一个子串 str2="ABCDABD" 2)现在要判断 str1 是否含有 str2, 如果存在,就返回第一次出现的位置, 如果没有,则返回-1 3)要求用最快的速度来完成匹配 4)你的思路是什么? .

qq_39696269的博客 3108

算法——KMP算法(Knuth-Morris-Pratt算法)

(即“失败函数”或“next数组”)避免在匹配失败时回溯主串,从而将时间复杂度优化到。(Knuth-Morris-Pratt算法)是一种高效的。(n是主串长度,m是模式串长度),远优于暴力匹配算法的。其核心思想是通过预处理模式字符串,利用。掌握KMP算法的核心在于理解。

oopxiajun博客专栏 1582

字符串算法之KMP 算法(Knuth-Morris-Pratt Algorithm, 字符串匹配)详细解读

KMP算法在文本搜索、DNA序列比对、编译器词法分析等领域具有广泛的应用。其高效的匹配能力使其成为字符串匹配问题中的重要选择。

欢迎来到我的博客!这里是一个专注于计算机技术的分享平台,涵盖编程开发、算法研究、系统架构、软件工程等多个领域。无论你是初学者还是资深开发者,都能在这里找到有价值的内容。 1495

【数据结构】KMP算法概述

KMP算法,全称为Knuth-Morris-Pratt算法,是一种用于字符串匹配的算法。它的核心思想是利用已知信息来避免无用的比较操作,从而提高算法效率。KMP算法的时间复杂度为O(n + m),其中n为模式串的长度,m为文本串的长度。本文将介绍基础的KMP算法和它的变种。

欢迎。 2407

Knuth-Morris-Pratt 字符串查找算法

听说室友最近在搞这个,所以我也搞了一下。。   大概就是翻了翻别人的博客看了看,自己打了打,感觉不是很难但是不知道为什么感觉看的博客的思路很啰嗦。 我自学的时候看了两篇博客,这两个博主都很厉害,建议先按顺序看看这两篇博客(如果看懂了的话就不要再看我下面写的了,不懂next数组的话我倒是提供了另一种好理解的替代办法): 一:     kb.cnblogs.com/page/176818 二

Triose_Stream的博客 711
上一篇: zoj 3956 Course Selection System
下一篇: 2017 多校3 1003 Kanade's sum
threeh20
博客等级 码龄9年 64粉丝 422原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值