Spaces:
Sleeping
Sleeping
There are n robbers at coordinates (a1,b1), (a2,b2), ..., (an,bn) and m searchlight at coordinates (c1,d1), (c2,d2), ..., (cm,dm). In one move you can move each robber to the right (increase ai of each robber by one) or move each robber up (increase bi of each robber by one). Note that you should either increase all ai or all bi, you can't increase ai for some points and bi for some other points.Searchlight j can see a robber i if ai≤cj and bi≤dj. A configuration of robbers is safe if no searchlight can see a robber (i.e. if there is no pair i,j such that searchlight j can see a robber i).What is the minimum number of moves you need to perform to reach a safe configuration? |