10697 - Firemen barracks
Moderator: Board moderators
Hello everybody
I pass all testes which were given in this topic but still can't get AC. Somebody who solve this problem by Pascal tell me please did you use real or double and give some tests please.
Thanks.
I pass all testes which were given in this topic but still can't get AC. Somebody who solve this problem by Pascal tell me please did you use real or double and give some tests please.
Thanks.
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650
Real Type.
Greetings!
Real Type for everything.
Did you check the I/O in previos post?
Keep posting!
Real Type for everything.
Did you check the I/O in previos post?
Keep posting!
_.
Hello _.B._
Yes my program is giving right answers for your last post I/O.
Please give some more Test cases if you Can.
Thanks.
Yes my program is giving right answers for your last post I/O.
Please give some more Test cases if you Can.
Thanks.
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650
I\O.
Greetings!
Well, this is all I can think of right now:
Input:
Output:
Hope it helps.
Keep posting!
Well, this is all I can think of right now:
Input:
Code: Select all
5
-800.0 -799.9 0.0 0.0 800.0 799.9
-800.0 -799.9 0.0 0.0 800.0 800.0
-99.9 -100.0 -100.0 -99.9 0.0 0.0
0.0 0.0 0.1 0.0 0.0 0.1
0.0 0.0 0.0 0.0 0.0 0.0
Code: Select all
There is no possible location.
The equidistant location is (-12798400.0, 12799200.0).
The equidistant location is (-50.0, -50.0).
The equidistant location is (0.1, 0.1).
There is an infinity of possible locations.
Keep posting!
_.
I can't understand why answer for
0.0 0.0 0.0 0.0 0.0 0.0
is not 0.0 0.0
or for
-800.0 -799.9 0.0 0.0 800.0 799.9
is not 0.0 0.0
But anyway after changing it I got AC.
Thanks _.B._
0.0 0.0 0.0 0.0 0.0 0.0
is not 0.0 0.0

or for
-800.0 -799.9 0.0 0.0 800.0 799.9
is not 0.0 0.0

But anyway after changing it I got AC.

Thanks _.B._
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650
Because in this case, any point is equally close to all three places.Eduard wrote:I can't understand why answer for
0.0 0.0 0.0 0.0 0.0 0.0
is not 0.0 0.0![]()
Why should it be? The origin is on distance 0 from point 2, but on distance 1131.3 from the other two points.Eduard wrote:or for
-800.0 -799.9 0.0 0.0 800.0 799.9
is not 0.0 0.0![]()
Sory for the last test case but for first i think answer is 0.0 and all of three points are in distanse of 0.0 from it.
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650
Good!
Good!Eduard wrote:But anyway after changing it I got AC.

Maybe you can say what was your mistake, so others can check for it too

Keep posting!
_.
I can give I think such good advice.This is for numbers like 0.05 which is 0.1.
If your answers are X,Y then do this.
[pascal]
if x>0 then x:=x+0.00000000001 else x:=x-0.00000000001;
if y>0 then y:=y+0.00000000001 else y:=y-0.00000000001;
[/pascal]
This was my mistake and when 3 numbers are the same like this.
Input
Output
If your answers are X,Y then do this.
[pascal]
if x>0 then x:=x+0.00000000001 else x:=x-0.00000000001;
if y>0 then y:=y+0.00000000001 else y:=y-0.00000000001;
[/pascal]
This was my mistake and when 3 numbers are the same like this.
Input
Code: Select all
1
0.5 0.5 0.5 0.5 0.5 0.5
Code: Select all
There is no possible location.
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650
Well, for the above case, my AC program doesn't give that output... But anyway, I wonder what the special checker is really for. It doesn't accepts -0.0, and it doesn't tolerate rounding errors of -0.05 etc... 

7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Yes, I agree that.Observer wrote:Well, for the above case, my AC program doesn't give that output... But anyway, I wonder what the special checker is really for. It doesn't accepts -0.0, and it doesn't tolerate rounding errors of -0.05 etc...
A problem involving floating point isn't so easy to create,
it requires the problem setter to have much experience in setting problems.
(One of the "qualified" problem setter is Shahriar Manzoor, although his tricky input always make me tired of tracing......) I think the problem setter is not careful enoguh this time. It is not so good to require output with one digit after decimal point, as I remember, there is no other floating problem on the judge requires so few digits after decimal point. Because the precision error will become a big problem.........
My signature:
- Please make discussion about the algorithm BRFORE posting source code.
We can learn much more in discussion than reading source code. - I HATE testing account.
- Don't send me source code for debug.
all I/O tests passed successfully but still WA
Hi all. I checked my program with all your I/O sample, and every thing is all right...
Yet... I still get WA from the judge...
Could someone post more I/O? I just can't understand what is wrong...
Cheers
Flux
Yet... I still get WA from the judge...
Could someone post more I/O? I just can't understand what is wrong...
Cheers
Flux
-
- Experienced poster
- Posts: 123
- Joined: Thu Feb 10, 2005 4:46 am
How is this supposed to work with eps of 1e-14 for colinearity test?The coordinates of each location is a pair of floating point numbers with the precision up to one-tenth.
What's about this case?
1
0.0000000000 0.0000000000
1.0000000000 0.0000000001
1.0000000000 -0.0000000001
To be the best you must become the best!
-
- Experienced poster
- Posts: 123
- Joined: Thu Feb 10, 2005 4:46 am
How am I supposed to work with such definition? Actually each point becomes a square, so the answer will be infinity in most cases. Should I read it as "there is not more than 10 significant digits after decimal point, and points have their exact coordinates"?The coordinates of each location is a pair of floating point numbers with the precision up to one-tenth
Also, what is the limit for coordinates? 347856347856783458353647853465783645763478563478534534534.5 isn't easier to handle than just 123.000000001
To be the best you must become the best!