You are not logged in. Please login at to post your questions!


Doubt in "k-good" editorial

The problem k-good strings from snackdown qualifier. In the editorial's optimization section it is written that we need to consider only those m's that is value of some count. Anyone please explain this part of the editorial.

asked 02 Jun '16, 10:13

arpit728's gravatar image

accept rate: 10%

edited 04 Jun '16, 15:47

skbly7's gravatar image


We need to consider only those m's(m is the minimum frequency count of the alphabets) which are equal to some wc (alphabet frequency). Suppose we have alphabet frequencies as 10 20 30 40 50 and K=5. So for m=[0,10] we get the the sequence of 10 20 30 40 50. Similarly for m=[11,20] we get the sequence of 20 30 40 50. and so on..... So we only calculate for those values of m which are equal to some wc.


answered 02 Jun '16, 12:55

asutoshrana's gravatar image

accept rate: 42%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 02 Jun '16, 10:13

question was seen: 1,635 times

last updated: 04 Jun '16, 15:47