100 atcoder#ABC229D. [ABC229D] Longest X
[ABC229D] Longest X
Score : points
Problem Statement
Given is a string consisting of X and ..
You can do the following operation on between and times (inclusive).
- Replace a
.with anX.
What is the maximum possible number of consecutive Xs in after the operations?
Constraints
- Each character of is
Xor.. - is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
XX...X.X.X.
2
5
After replacing the Xs at the -th and -th positions with X, we have XX...XXXXX., which has five consecutive Xs at -th through -th positions.
We cannot have six or more consecutive Xs, so the answer is .
XXXX
200000
4
It is allowed to do zero operations.