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

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

358 Don't Have A Cow, Dude

Post by misof » Tue Dec 12, 2006 12:37 pm

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.

User avatar
Carlos
System administrator
Posts: 1286
Joined: Sat Oct 13, 2001 2:00 am
Location: Valladolid, Spain
Contact:

Post by Carlos » Wed Dec 13, 2006 1:33 am

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.

User avatar
Carlos
System administrator
Posts: 1286
Joined: Sat Oct 13, 2001 2:00 am
Location: Valladolid, Spain
Contact:

Post by Carlos » Sun Dec 24, 2006 3:59 am

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
Location: Calgary, Canada

Post by Darko » Sun Dec 24, 2006 1:06 pm

Well, most of those had PI hard coded (as per problem statement), it doesn't work anymore (using Math.PI fixed it for me)

User avatar
Carlos
System administrator
Posts: 1286
Joined: Sat Oct 13, 2001 2:00 am
Location: Valladolid, Spain
Contact:

Post by Carlos » Sun Dec 24, 2006 1:30 pm

I think we'll end up by using a special corrector program that allows both PI solutions...it's not fair for the previous submissions to get all WA.
DON'T PM ME --> For any doubt, suggestion or error reporting, please use the "Contact us" form in the web.

User avatar
Carlos
System administrator
Posts: 1286
Joined: Sat Oct 13, 2001 2:00 am
Location: Valladolid, Spain
Contact:

Post by Carlos » Sun Feb 11, 2007 3:23 am

I've made a special corrector program that allows a 0.01 error, so that every difference in the value of PI should be allowed.
DON'T PM ME --> For any doubt, suggestion or error reporting, please use the "Contact us" form in the web.

Locked

Return to “Bugs and suggestions”