## 358 Don't Have A Cow, Dude

The forum to report every bug you find or tell us what you'd like to find in UVa OJ

Moderator: Board moderators

misof
A great helper
Posts: 430
Joined: Wed Jun 09, 2004 1:31 pm

### 358 Don't Have A Cow, Dude

The problem statement is ambiguous on output formatting. Moreover, the problem redefines the value of PI. The outcome is that people who use correct equations other than the author did get WA because they make precision errors on other places than the author did. (E.g., once you call sin(), you are implicitly using an other value of PI than the problemsetter said.)

Here:
http://online-judge.uva.es/board/viewto ... hlight=358 is a thread with some people complaining.

Fixes:

Problem statement original:

Code: Select all

``````Express your answer correct to two decimal places. Use PI = 3.14159.

For each test case, output a statement in the format shown in the sample output below.The outputs of two consecutive cases will be separated by a blank line.
``````
Problem statement fixed:

Code: Select all

``````For each test case, output a statement in the format shown in the sample output below. The number P and the answer shall be rounded to two decimal places using standard output routines. The outputs for consecutive cases shall be separated by a blank line.

Assume that pi=2*acos(0) or pi=2*cos_inverse(0).
``````
I can send you my code that uses a correct PI if you need it to regenerate the output data.

Carlos
Posts: 1286
Joined: Sat Oct 13, 2001 2:00 am
Contact:
I changed the description and judge's output. Redefining PI with such a low precision will only generate problems.

I've put this problems in the first place in priority for rejudging, so that we can see the results soon!

Thanks!!!!!
DON'T PM ME --> For any doubt, suggestion or error reporting, please use the "Contact us" form in the web.

Carlos
Posts: 1286
Joined: Sat Oct 13, 2001 2:00 am
Contact:
This problem should be reviewed.....only 4% AC rate?
DON'T PM ME --> For any doubt, suggestion or error reporting, please use the "Contact us" form in the web.

Darko
Guru
Posts: 580
Joined: Fri Nov 11, 2005 9:34 am
Well, most of those had PI hard coded (as per problem statement), it doesn't work anymore (using Math.PI fixed it for me)

Carlos
Posts: 1286
Joined: Sat Oct 13, 2001 2:00 am