atcoder#ARC108B. [ARC108B] Abbreviate Fox
[ARC108B] Abbreviate Fox
Score : points
Problem Statement
Given is a string of length consisting of lowercase English letters.
Snuke can do this operation any number of times: remove fox
occurring as a substring from and concatenate the remaining parts of .
What is the minimum possible length of after some number of operations by Snuke?
Constraints
- is a string of length consisting of lowercase English letters.
Input
Input is given from Standard Input in the following format:
Print the minimum possible length of after some number of operations by Snuke.
6
icefox
3
- By removing the
fox
at the end oficefox
, we can turn intoice
.
7
firebox
7
fox
does not occur as a substring.
48
ffoxoxuvgjyzmehmopfohrupffoxoxfofofoxffoxoxejffo
27