Page 1 of 2

11326 - Laser Pointer

Posted: Sun Oct 28, 2007 5:31 am
by FAQ
My output below is correct? I still get a ton of WAs

Code: Select all

14
2 5 45
5 5 44
10 5 1
10 5 44
10000 5 45
10000 10000 45
10000 10000 0
15 5 45
5 5 45
12 12 75
11 5 45
10 5 45
4 5 45
6 5 45

Code: Select all

1.000
1.000
1.000
1.389
1.414
1.000
1.000
1.342
1.000
3.732
1.408
1.414
1.000
1.177

Posted: Sun Oct 28, 2007 5:41 am
by pineapple
y,my AC program gives the same results.
Strange,your process is also correct for theta=0.
I didn't take care of it and got 1 WA for this case.

Posted: Sun Oct 28, 2007 5:49 am
by FAQ
do you have any trick case? :(

Posted: Sun Oct 28, 2007 5:50 am
by pdah
My program gives the same result, too. But it still WA.

How about this test :

Code: Select all

1
10000 1 89
My program gives 57.299. I'm not sure if it's right or wrong :(

Posted: Sun Oct 28, 2007 5:52 am
by pineapple
To FAQ:
no,I just passed the sample, then add a "IF" condition and got accepted in the contest.If you need,I will send my code to you by pm.

Posted: Sun Oct 28, 2007 5:53 am
by FAQ
my output is the same :-?

to pineapple: yes, please, I'm going crazy now

Posted: Sun Oct 28, 2007 5:54 am
by pineapple
To pdah:
y,my program gives the same result for your case.
To FAQ:
I have sent a PM to you.received?

Posted: Sun Oct 28, 2007 6:24 am
by FAQ
received ! Thanks so much

I know my trouble :| I use "A/B + Epsilon" that's why it got WA
Some more cases for who getting WA

Code: Select all

20
618 1709 14
6024 852 88
8518 1245 73
877 474 40
1063 8813 71
1939 2347 27
2260 1063 17
5746 2369 21
9124 1509 50
2598 6734 77
3008 4933 82
303 3770 47
3880 7169 46
866 3632 16
3848 8320 39
8031 7295 78
4392 4408 0
4913 1003 6
4125 1309 76
3168 6429 33

Code: Select all

1.000
28.590
3.415
1.269
1.000
1.000
1.000
1.000
1.542
3.383
6.281
1.000
1.000
1.000
1.000
3.856
1.000
1.000
4.051
1.000


Posted: Sun Oct 28, 2007 6:26 am
by pdah
Strange ! I got exactly the same results. And I didn't use any epsilon in my program. I still get WA.
Can I post the code here?

Posted: Sun Oct 28, 2007 6:30 am
by FAQ
I already wrote a generator for this problem so you can post your code here, I will use it to compare the answers

Posted: Sun Oct 28, 2007 6:52 am
by pdah
This is my program, thanks in advance :)

Code: Select all

removed

Posted: Sun Oct 28, 2007 6:55 am
by hi!man!
I use eps=1E-7 and pass it,
so I think eps is not main reason why you get WA.

Posted: Sun Oct 28, 2007 7:03 am
by pdah
What is epsilon used for in this problem? I didn't use epsilon in my program.

Posted: Sun Oct 28, 2007 7:07 am
by pineapple
oh,I see you used "float" in your code,change it to "double" and tried it again.the float type has no enough precision.

Posted: Sun Oct 28, 2007 7:09 am
by hi!man!
If I don't use epsilon, I will get WA because of precision error.