Page 2 of 2
Posted: Wed Jul 04, 2007 5:26 pm
i'm using :

Code: Select all

``````FreePascal IDE for Win32 for i386
Target CPU: i386
Version 1.0.4 2005/05/08
(Compiler Version 2.0.0)
``````
but i got CE

Code: Select all

``GOT AC``

Posted: Sat Sep 01, 2007 8:00 pm
Mushfiqur Rahman wrote: u will get wrong answer because u misunderstood the problem.

In this problem u have to calculate the SBC of all the words which start with the same latter as given word( with the same length ) then find the average and have to determine the given words SBC is "below" or "above or below" than the average.
why is the output for "bubu" is "below" ?
i think "bubu" is a valid word, and there is no other length 4 word, that starts with b; so it should be "above or equal" ??

am i missing any point here ?

Posted: Sun Sep 02, 2007 11:27 am
smilitude wrote:why is the output for "bubu" is "below" ?
First thing we should consider is how many vaild words are there?
The problem says the first letter is the same as the given word, second and fourth letter have 5 choices separatedly, and the third letter has 21 choices. So total possible words is 5x21x5=525, and the average of the possiblity of one word is 1.0 / 525 = 0.00190...

And accroding the table, we can find the possibility of the word "bubu" is (because first letter won't change):
( 0.0393/sumP{aei...} ) x ( 0.0142/sumP{bcd...} ) x ( 0.0393/sumP{aei...} ) = 0.0000219...
That's why the answer in this case is below.

Posted: Sun Sep 02, 2007 2:52 pm
thanks!
i thought "how many valid words are there in the input"

edit : but you are telling me about probability, but they have a formula and a definition for SBC and thats different

### Re: 11201 - The Problem of the Crazy Linguist

Posted: Wed Feb 06, 2013 5:05 pm
someone can help me please? getting WA

Code: Select all

``````AC
``````

### Re: 11201 - The Problem of the Crazy Linguist

Posted: Wed Feb 06, 2013 10:05 pm
It is usually better to avoid floating point when possible.

### Re: 11201 - The Problem of the Crazy Linguist

Posted: Wed Feb 06, 2013 10:55 pm
Thanks! Got AC!