11144  S.O.S.
Moderator: Board moderators
11144  S.O.S.
Is there any trick input for this problem? thx:)
What's the correct output for this:
Code: Select all
3
4
4 0 0 0 1 1 1 1 0
3 2 2 3 2 3 3
4 21 0 22 0 22 1 21 1
3 33 2 33 3 34 3
0
15
4
4 0 0 0 1 1 1 1 0
3 2 2 3 2 3 3
4 21 0 22 0 22 1 21 1
3 33 2 33 3 34 3
0
4
4
4 0 0 0 1 1 1 1 0
3 2 2 3 2 3 3
4 21 0 22 0 22 1 21 1
3 33 2 33 3 34 3
2
4
We use Set_A to represent all the line segments of polygon A, and Set_B to represent all the line segments of polygon B, then the minimum distance between polygon A and B is the minimum distance between any line segments in SetA and SetB.fernando wrote:How to determine this mnimum distance between the polygons?
Two buildings are neighbor if their minimum distance be less than 30 (meters).
well there is a tricky case but it is tough to make such. the case is like this:
say there are 4 houses. A, B, C. A is burnt initially. Then say as its neighbour it can burn B at 5min and C at 10min. But B can burn C in 3min. So C is burnt within 8 min. not 10min. so if there r 8min times then ur output have to be A B C.
say there are 4 houses. A, B, C. A is burnt initially. Then say as its neighbour it can burn B at 5min and C at 10min. But B can burn C in 3min. So C is burnt within 8 min. not 10min. so if there r 8min times then ur output have to be A B C.
Self judging is the best judging!

 Experienced poster
 Posts: 111
 Joined: Mon Jan 09, 2006 6:19 pm
 Location: Tehran, Iran
 Contact:
//cut off
Last edited by arsalan_mousavian on Fri Nov 10, 2006 6:36 pm, edited 1 time in total.
In being unlucky I have the record.
I like when problemsetters put things like
in the problem statements. It's like saying "my data and solution could be wrong, so I'll offset my precision erros with ambiguouty in the problem statment" . I mean, if a problem states that 1 and 1 + 1e8 are the same numbers, and then asks you to take a ceiling of 1, what exactly are you supposed to do? This is just the most trivial example, when you solve a problem that requires geometry routines, there are multiple ways of interpreting and using that 1e8...It should be noted that two floating point numbers a and b assumed equal if their absolute difference is less than 1e8.