Manhattan Rectangle wrong explanation for example

feb19
long-contest

#1

In the given example how can we determine the points just from the first 2 queries? I mean the Manhattan distance can be zero for every point on the rectangle.

P.S. The query is unanswered in the comment section for more than a day now.


#2

@babangain just read the first two lines of the explanation. It states “From answers to the first two queries, it is clear that the lower left and upper right corner of the rectangle lie at points (1,2) and (3,4) respectively.”
And I know that if they would have given actual queries than answer would be obvious but my point is that given explanation is incorrect for the sample question.


#3

Well, It didn’t indicate in that problem they have solved by using 2 queries only.
It has just shown input/output example.
Had they shown actual no. of queries needed for solving it, and the queries…
Solutions would have been quite guessable.
Off course that’s not something they would want.


#4

That’s right. What does it meams when Manhattan distance is 0? It means that both point are same. The point whose Manhattan distance from (1,2) is 0 is (1,2) only. Same for (3,4). So whatever is written in explanation is true.


#5

And yeah, First two queries conclude that points are (1,2) and (3,4). It doesn’t mean only 2 are sufficient. That’s why they have taken two more points. But as you can see distances increase. That confirms answer.


#6

Yes that’s true that it confirms that point are (1,2) and (3,4) but it does not confirm that they are the lowermost and upper-right coordinates of the rectangle. Any point on the rectangle would give 0.That is my point that it isn’t clear from the first 2 queries that xl, yl and xu, yu are (1,2) and (3,4)


#7

That’s the reason to take next 2 queries. Did you read my comment?