Score : $600$ points
Given is a string $S$ consisting of Y and ..
You can do the following operation on $S$ between $0$ and $K$ times (inclusive).
What is the maximum possible number of consecutive Ys in $S$ after the operations?
Y or ..Input is given from Standard Input in the following format:
$S$ $K$
Print the answer.
YY...Y.Y.Y. 2
3
After swapping the $6$-th, $7$-th characters, and $9$-th, $10$-th characters, we have YY....YYY.., which has three consecutive Ys at $7$-th through $9$-th positions.
We cannot have four or more consecutive Ys, so the answer is $3$.
YYYY....YYY 3
4