#P17864. [FJCPC 2026] 贝贝拯救FJCPC
[FJCPC 2026] 贝贝拯救FJCPC
Background
:::align{center}
:::
Problem Description
FJCPC (Fujian Provincial Collegiate Programming Contest) is not only the highest-level collegiate programming contest in Fujian Province, but also a national invitational contest of CCPC (China Collegiate Programming Contest).
To attract outstanding contestants from all over the country, Beibei, as the publicity officer of the contest, has prepared a large number of slogans. During the generation of the slogans, the system randomly generates a very long base string and tries many times to embed the contest identifier fjcpc into it. Since the embedding positions are completely random, some positions may be overwritten repeatedly.
Given a string consisting of lowercase letters, please count how many times the complete substring fjcpc occurs in this string.
Input Format
The input consists of a single line, containing a string of length , consisting only of lowercase letters.
Output Format
Output a single integer, the number of occurrences of the substring fjcpc in the string .
beibeilovesfjcpc
1
fjfjcpccpcfjcpc
2
Hint
Note: a substring must be contiguous. For example, in fjfjcpc, fjcpc occurs once.
Translated by QwenWork