Wireless Signal

The city of Byteland is rectangular in shape and can be represented as a 2D coordinate system with nnn columns and mmm rows. At each of the intersections, there is a house. The top left house of the city is situated at coordinate (0,m−1)(0, m-1)(0,m−1) and the bottom right house is situated at (n−1,0)(n-1, 0)(n−1,0). The town hall is situated at the coordinate (x,y)(x, y)(x,y) which contains a cell tower providing wireless network signal to all the houses in Byteland. Judges will be moving to Byteland soon. Wireless signal travels in a straight line and it gets weakened only if the signal has to travel straight through another house, judges want to choose a house in such a way that their devices receive maximum possible signal strength.


This is a companion discussion topic for the original entry at https://toph.co/p/wireless-signal