Farmer John has taken his cows on a trip to the city!As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouettes formed by the rectangular buildings.The entire horizon is represented by a number line with N buildings. Building i's silhouette has a base that spans locations Ai through Bi along the horizon and has height Hi . Determine the area, in square units, of the aggregate silhouette formed by all N buildings.
Farmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouettes formed by the rectangular buildings. The entire horizon is represented by a number line with N (1 ≤ N ≤ 40,000) buildings. Building i's silhouette has a base that spans locations Ai through Bi along the horizon (1 ≤ Ai < Bi ≤ 1,000,000,000) and has height Hi (1 ≤ Hi ≤ 1,000,000,000). Determine the area, in square units, of the aggregate silhouette formed by all N buildings.
![HBC25078斐波那契数列[USACO 2007 Ope S]City Horizon题解
-第1张图片-东莞河马信息技术 HBC25078斐波那契数列[USACO 2007 Ope S]City Horizon题解
-第1张图片-东莞河马信息技术](https://www.xxstcz.com/zb_users/upload/2023/11/20231112160301169977618160460.jpeg)