Page 2 of 2

Posted: Mon Apr 09, 2007 11:49 am
by jichen1234
Maybe we can discuss a simpler testcase

Input

Code: Select all

1 0 20 0 0 25
0 0 0 0 0 0
My output is

Code: Select all

3.45
This is a cone bottle with a 20-diameter circular base .
And the volume is about 301.760446

Can u tell me your output?

Posted: Mon Apr 09, 2007 12:28 pm
by Erik
Hi,

my program outputs the wrong result 10 but that is because I consider it as an invalid testcase. A bottle should have rn>0.
Anyway, my algebra program tells the volume for s=3.45 is 119.8352061. I found s=5.1 to yield a volume of 301.7440301.

Maybe I make some fundamental error?

Cu, Erik

Posted: Mon Apr 09, 2007 12:35 pm
by Erik
Hi,

I tested and found there are testcases with rn=0 in the input.
I have to take care of this.

Cu, Erik

Posted: Mon Apr 09, 2007 1:03 pm
by Erik
Hi,

I now updated the program and it gives 5.10 as result. Anyway, still WA.

Cu, Erik :cry:

Posted: Mon Apr 09, 2007 2:13 pm
by jichen1234
Erik wrote:Hi,

my program outputs the wrong result 10 but that is because I consider it as an invalid testcase. A bottle should have rn>0.
Anyway, my algebra program tells the volume for s=3.45 is 119.8352061. I found s=5.1 to yield a volume of 301.7440301.

Maybe I make some fundamental error?

Cu, Erik
mm, I think it's not accurate enough.
If s=5.11 instead of 5.10, what's the answer of the volume?

Posted: Mon Apr 09, 2007 6:52 pm
by Erik
Hi,
If s=5.11 instead of 5.10, what's the answer of the volume?
This gives 303.1205174. So 5.10 is the correct answer I suppose.

Cu, Erik

Posted: Wed Apr 11, 2007 8:53 am
by jichen1234
How about the following testcase

Code: Select all

1 0 20 0 20 25
1 25 20 0 0 25
1 0 20 25 20 25
All are the same cylinder with 20-diameter base and 25 height filled with 1 deep water, which volume is 314.159265

I found s=1.67 and the volume is 314.159272

Posted: Sat Apr 14, 2007 9:41 am
by Erik
Hello,
I found s=1.67
Me to.

Could anyone who solved this task please give correct output for:

Code: Select all

0 10 20 5 5 25
1 10 20 5 5 25
2 10 20 5 5 25
3 10 20 5 5 25
4 10 20 5 5 25
5 10 20 5 5 25
6 10 20 5 5 25
7 10 20 5 5 25
8 10 20 5 5 25
9 10 20 5 5 25
10 10 20 5 5 25
11 10 20 5 5 25
12 10 20 5 5 25
13 10 20 5 5 25
14 10 20 5 5 25
15 10 20 5 5 25
16 10 20 5 5 25
17 10 20 5 5 25
18 10 20 5 5 25
19 10 20 5 5 25
20 10 20 5 5 25
21 10 20 5 5 25
22 10 20 5 5 25
23 10 20 5 5 25
24 10 20 5 5 25
25 10 20 5 5 25
0 0 0 0 0 0
Cu, Erik :)

Posted: Sat Apr 14, 2007 2:17 pm
by mf
My accepted program outputs this:

Code: Select all

0.00
2.85
4.41
5.69
6.82
7.85
8.79
9.69
10.59
11.50
12.46
13.44
14.35
15.17
15.92
16.59
17.18
17.69
18.11
18.43
18.65
18.83
19.03
19.26
19.53
20.00

Posted: Sat Apr 14, 2007 8:20 pm
by Erik
Thanks mf!

I've got the same outputs, but still WA.
Maybe it's all about precision?

Here another set:

Code: Select all

0.0 0.5 47.634 0 11.54 0.6
0.1 0.5 47.634 0 11.54 0.6
0.2 0.5 47.634 0 11.54 0.6
0.3 0.5 47.634 0 11.54 0.6
0.4 0.5 47.634 0 11.54 0.6
0.5 0.5 47.634 0 11.54 0.6
0.51 0.5 47.634 0 11.54 0.6
0.52 0.5 47.634 0 11.54 0.6
0.55 0.5 47.634 0 11.54 0.6
0.58 0.5 47.634 0 11.54 0.6
0.59 0.5 47.634 0 11.54 0.6
0.595 0.5 47.634 0 11.54 0.6
0.598 0.5 47.634 0 11.54 0.6
0.599 0.5 47.634 0 11.54 0.6
0.5995 0.5 47.634 0 11.54 0.6
0.5999 0.5 47.634 0 11.54 0.6
0.59995 0.5 47.634 0 11.54 0.6
0.6 0.5 47.634 0 11.54 0.6
0 0 0 0 0 0
My Output:

Code: Select all

0.00
11.70
19.01
25.70
32.62
41.01
42.00
42.91
45.17
46.77
47.18
47.37
47.50
47.55
47.58
47.62
47.62
47.63
Cu, Erik :)

Posted: Sat Apr 14, 2007 8:50 pm
by mf
My output is the same as yours.

If you are really desperate, try to search for input/output data for this problem on Waterloo's site.

Posted: Sat Apr 14, 2007 9:28 pm
by Erik
Hi,

I checked out input from Waterloo and my program gave same results.
That's really frustrating now.

Erik

Posted: Sun Apr 15, 2007 9:43 am
by Erik
Hi,

:P YIPPIE! :P

Finally I got AC. It turned out to be a problem in the calculation because to large intermediate values. I realized this in one instance but forgot there is another part it can occur.

Cu, Erik :)