## 11291 - Smeech

All about problems in Volume 112. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Piklu_sust
New poster
Posts: 23
Joined: Fri Sep 01, 2006 10:17 am
Location: CSE, SUST

### 11291 - Smeech

Can anyone explain what should do in this problem?
I cannot find the meaning of the following statement:
With probability p, (p e1 e2) represents x+y where x is the value of e1 and y is the value of e2; otherwise it represents x-y.
How can be p used for the statement?

helloneo
Guru
Posts: 516
Joined: Mon Jul 04, 2005 6:30 am
Location: Seoul, Korea
I understood it this way..
the expected value of (p e1 e2) is p*(x+y) + (1-p)*(x-y)..

tanvir
New poster
Posts: 22
Joined: Wed Aug 31, 2005 12:09 pm

### wa

can anyone check this code. im getting wa again again

Code: Select all

cut
best regard
tanvir
Last edited by tanvir on Mon Oct 01, 2007 7:18 am, edited 1 time in total.

helloneo
Guru
Posts: 516
Joined: Mon Jul 04, 2005 6:30 am
Location: Seoul, Korea
Try this case..

Code: Select all

(0.3 2 (1 1 -10))
()
My output is..

Code: Select all

5.60

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:
Hint: My code is only about 30 lines long!

tanvir
New poster
Posts: 22
Joined: Wed Aug 31, 2005 12:09 pm
sorry i was not considering the negetive numbers there...
but now im considering the negetive numbers here....
but also wa wa wa
can any one check the code or give sample input output....

Code: Select all

cut aft ac
regard
tanvir
Last edited by tanvir on Mon Oct 01, 2007 10:38 am, edited 1 time in total.

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:
I'm not sure, but how do you know the format of the real numbers that is in the judge input?

helloneo
Guru
Posts: 516
Joined: Mon Jul 04, 2005 6:30 am
Location: Seoul, Korea
Another test case..

Code: Select all

(1.0 (1.0 (1.0 -1 -2) (1.0 -1 -2)) (1.0 (1.0 1 2) 2))
()
My output is..

Code: Select all

-1.00

tanvir
New poster
Posts: 22
Joined: Wed Aug 31, 2005 12:09 pm
thnx helloneo
i was really making dumping things in nested area.
got ac last.
tanvir