1300 - Parallel Expectations
Moderator: Board moderators
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
1300 - Parallel Expectations
Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!
-
- New poster
- Posts: 17
- Joined: Fri Oct 21, 2016 12:58 pm
- Location: NS, Canada
Re: 1300 - Parallel Expectations
Consider this input:
Correspondingly, my output is
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?
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.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
Correspondingly, my output is
But uDebug outputs something completely different:-36.0000
-36.0000
-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:-71.7557
-71.7557
-34.6885
-41.0000
-90.0000
-47.0000
165.0000
52.0000
42.0000
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?