HBC25078斐波那契数列[USACO 2007 Ope S]City Horizon题解

庄子墨 算法基础篇 50 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。
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张图片-东莞河马信息技术
(图片来源网络,侵删)
想要在职场中立于不败之地?那就来试试全网最全C++题库,让您在练习中快速提升技能。

标签: HBC25078斐波那契数列[USACO 2007 Ope S]City Horizon题解