Description: Background
Three farmers get up at 5 every morning, then go to 3 cow milking barn. The first farmers in the 300 time (from 5:00 start time, seconds) to his milking cows until 1000 moment. The second moment of farmers in the 700, the end time in 1200. The third moment of 2100 farmers in the moment of the end of 1500. The longest period of at least one continuous-time farmers milking 900 seconds (time from 300 to 1200 times), and the longest continuous time no one milking (milking from the beginning to the end of milking) 300 seconds (time from 1200 to 1500 time).
Your task is to compile a program, there are N read a farmer (1 <= N <= 5000) N cattle crowded list of working hours, calculate the following two points (both seconds):
• At least one person up to the time period in milking.
• No milking the longest period of time.
Enter
Line 1: an integer N
No. 22 .. N 1 lines: each line is less than one million two non-negative integer, indicating the start
To Search:
File list (Check if you may need any files):
挤牛奶\Debug\vc60.idb
......\.....\vc60.pdb
......\.....\挤牛奶.exe
......\.....\挤牛奶.ilk
......\.....\挤牛奶.obj
......\.....\挤牛奶.pch
......\.....\挤牛奶.pdb
......\.....\辅导费.obj
......\挤牛奶.cpp
......\挤牛奶.dsp
......\挤牛奶.dsw
......\挤牛奶.ncb
......\挤牛奶.opt
......\挤牛奶.plg
......\Debug
挤牛奶