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


Akhil and colored balls, wrong example ?

ok, so in problem link umm, it said that "BWBW" is the only solution, but I finds out that "BWWW" can be the answe too, ok, let's break it down "WBWB" and "BWBW", all of them are different so hammington distance is 4, "WBBB" and "BWBW" have hammington distance of 3, pos 1, 2, and 4, total of 7, and for "BWWW", "WBWB" and "BWWW" have hammington distance 3, and "WBBB" and "BWWW" have hamington distance of 4...which equals 7, now there has become two answers...also, there is another constraint which says lexicographically smallest arangement...hmm, does that matter and I have been stupid ? ( anyways I don't understand what lexicographically smallest arangement means )

asked 14 Jun '18, 21:46

flaze07's gravatar image

accept rate: 21%

Lexicographically means Alphabetically(Dictionary wise),

For example:

abb < acb, aab < aac, bba < bca , BWBW<BWWW...


answered 14 Jun '18, 21:58

hrishabh15's gravatar image

accept rate: 33%

welp...apparently I was right that lexicographically is important in the problem, thanks

(15 Jun '18, 07:43) flaze072★
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: 14 Jun '18, 21:46

question was seen: 76 times

last updated: 15 Jun '18, 07:43