random answer. Computer science. Another law will be endorsed to expand the uniformity between the specialists. The public authority chose to cause everybody to have a similar occupation classification by playing out the accompanying activity quite a few times (conceivably zero). There is a decent objective
Correct answer will be upvoted else Multiple Downvoted. Don't submit random answer. Computer science.
Another law will be endorsed to expand the uniformity between the specialists. The public authority chose to cause everybody to have a similar occupation classification by playing out the accompanying activity quite a few times (conceivably zero).
There is a decent objective boundary k=ab depicting that it is so natural to persuade people in general, and it will be utilized to decide the accomplishment of an activity.
In an activity, the public authority initially chooses a task class x with something like one laborer at the current second. Assume i1,… ,im (i1<… <im) are the places of the multitude of laborers with work classification x. In the event that k⋅(im−i1+1)≤m, the public authority can pick any work classification y with no less than one specialist at the current second and change the work class of all laborers with work class x to work classification y.
In case it is feasible to make all specialists have work classification x, we say that x is reachable. Would you be able to tell the public authority the arrangement of reachable occupation classifications?
Input
The main line contains three integers n,a,b (1≤n≤5000, 1≤a≤b≤105) — the number of laborers and the numerator and denominator of the boundary k, separately.
The subsequent line contains a string s of length n, comprising of lowercase English characters — the work classifications of every specialist. The characters 't', 'r', 'y', 'g', 'u', and 'b' don't show up in the string s.
Output
Print an integer c equivalent to the number of reachable occupation classifications followed by c space-isolated characters — the possible occupation classifications arranged in the lexicographical request
Step by step
Solved in 4 steps with 1 images