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

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

11291 - Smeech

Post by Piklu_sust »

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

Post by helloneo »

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

Post by tanvir »

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

Post by helloneo »

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:

Post by sclo »

Hint: My code is only about 30 lines long!

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

Post by tanvir »

sorry i was not considering the negetive numbers there...
but now im considering the negetive numbers here....
but also wa wa wa :roll:
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:

Post by sclo »

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

Post by helloneo »

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

Post by tanvir »

thnx helloneo
i was really making dumping things in nested area.
got ac last. :lol:
tanvir

Post Reply

Return to “Volume 112 (11200-11299)”