Shanghai 2006/uva 1382 Distant Galaxy: Enumerations & scans & Dynamic Maintenance

Source: Internet
Author: User
Tags time limit

1382-distant Galaxy

Time limit:3.000 seconds

Http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=460&page=show_ problem&problem=4128

You are are observing a distant galaxy using a telescope above the astronomy Tower, and you are a rectangle drawn in th At Galaxy whose edges are parallel to coordinate axes and contain maximum star systems on it edges has a great deal to do With the mysteries of universe. However you don't have the laptop with your, thus you have written the coordinates of all star systems down on a piece of Paper and decide to work out of the result later. Can you finish the this task?

Input

There are multiple test cases in the input file. Each test case is starts with one integern and (1N), the number of star systems on the telescope. N lines follow, each line consists of two integers:thex AndY coordinates of thek-th planet system. The absolute value of any coordinate are no more than109 and your can assume that planets are arbitrarily distributed In the universe.

N = 0 Indicates the end of input file and should is processed by your.

Output

For the all test case, output the maximum value to have found on a single line in the format as indicated in the sample OUTP Ut.

Sample Input

 
2 3 9 2 7 4 3 4 5 7 1 5 
ten 4 
6 One 4 4 6-0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.