POJ 3264 Balanced Lineup(最大最小差值 线段树水题)

For the daily milking, Farmer John’sNcows (1 ≤N≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To keep things simple, he will take a contiguous range of cows from the milking lineup to play the game. However, for all the cows to have fun they should not differ too much in height.

Farmer John has made a list ofQ(1 ≤Q≤ 200,000) potential groups of cows and their heights (1 ≤height≤ 1,000,000). For each group, he wants your help to determine the difference in height between the shortest and the tallest cow in the group.

,就会犯错误,就会有无数次让自己跌倒的机会出现,

POJ 3264 Balanced Lineup(最大最小差值 线段树水题)

相关文章:

你感兴趣的文章:

标签云: