Woburn Challenge 2016-17 Round 2 - Senior Division

Having run low on dilithium, the Enterprise has stopped at an isolated
space station to refuel. The station is inhabited by
As a neutral third party, it'll be up to the crew of the Enterprise to step in and make a fair decision. The Enterprise's ambassador, Neelex, has been entrusted with selecting environmental settings in a neutral fashion, with the space station's residents agreeing to abide by his decision. However, if he makes a poor decision, there could still be serious trouble!
Two aspects of the space station's environmental settings may be set -
its temperature (in degrees Celsius) and its gravity (in
Neelex may not be able to choose a set of environmental settings to leave everyone happy, but he'd like to get as close to that as possible, in order to minimize the chance of a dispute. What's the maximum number of humanoids that can be satisfied by any possible choice of temperature and gravity settings?
In test cases worth
In test cases worth another
In test cases worth another
Input Specification
The first line of input consists of a single integer
Output Specification
Output a single integer - the maximum number of humanoids that can be simultaneously satisfied.
Sample Input
4
64 100 35 55
100 200 10 40
111 190 39 69
12 120 38 38
Sample Output
3
Sample Explanation
The first, second, and fourth humanoids will all be satisfied if the
temperature is set to
Comments