#P9539. 「AWOI Round 2 B」树学
「AWOI Round 2 B」树学
Background
HR has just finished a simple and pretty problem, and it wants to try this one. But it is too weak and cannot solve it. Can you help it?
Problem Description
Construct a lowercase letter string of length , such that its similarity with the given lowercase letter string of length is within the range .
Define the similarity of two strings of length as .
You need to make the constructed string as small as possible in lexicographical order.
Input Format
The first line contains three positive integers .
The next line contains a string, representing the given lowercase letter string .
Output Format
Output one line containing a string, representing the lexicographically smallest feasible string you construct.
3 1 2
aab
aaa
4 4 4
awoi
awoi
Hint
Constraints
This problem uses bundled tests.
| Subtask ID | Special Property | Score | |
|---|---|---|---|
| None | |||
| A | |||
| B | |||
| None |
Special Property A: or .
Special Property B: Every character of is a, or every character is not a.
For of the testdata, , , and the length of is .
Staff | | | | | | :----------: | :----------: | :----------: | :----------: | | 玄学OIER荷蒻 | QwQ666_666 & 玄学OIER荷蒻 | QwQ666_666| 玄学OIER荷蒻 |
Translated by ChatGPT 5