You are not logged in. Please login at www.codechef.com 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

1★arpit728
6831868
accept rate: 10%

edited 04 Jun '16, 15:47

skbly7's gravatar image

2★skbly7
1.9k91724


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.

link

answered 02 Jun '16, 12:55

asutoshrana's gravatar image

4★asutoshrana
962
accept rate: 42%

toggle preview
Preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×1,664
×1,024
×643

question asked: 02 Jun '16, 10:13

question was seen: 1,635 times

last updated: 04 Jun '16, 15:47