1300 - Parallel Expectations

All about problems in Volume 13. 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
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

1300 - Parallel Expectations

Post by brianfry713 »

Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!
dull_jester
New poster
Posts: 17
Joined: Fri Oct 21, 2016 12:58 pm
Location: NS, Canada

Re: 1300 - Parallel Expectations

Post by dull_jester »

Consider this input:
d := 45 - 86
e := 22 - 9
j := 92 - f
c := 49 - 91
e := 12 - 45
j := 24 + f
e := f - 90
f := 44 - 91
END
g := 68 + 97
c := 40 + 75
b := 64 + a
j := 7 - b
i := a + 52
j := 41 + 19
b := 28 - b
a := a + b
END
The first program does not access the variables "a" and "b" at all, so there is nothing random in their final values: they should be -36 and -36.
Correspondingly, my output is
-36.0000
-36.0000
-34.6885
-41.0000
-90.0000
-47.0000
165.0000
52.0000
42.0000
But uDebug outputs something completely different:
-71.7557
-71.7557
-34.6885
-41.0000
-90.0000
-47.0000
165.0000
52.0000
42.0000
If uDebug's solution got Accepted at UVa, there are two possibilities:
a) there is no such input at UVa
b) there *is* such input at UVa, and UVa uses the solution equivalent to that of uDebug.

The problem is not that hard. Also, I've noticed that there are some rounding/precision errors and my answers differing for +/- 0.0001 from uDebug's output, so I guess some special checker program would be a good idea.

What do you say?
Post Reply

Return to “Volume 13 (1300-1399)”