HBC24840ShiftandReverse,哈希[USACO 2009 Mar S]Look Up题解

柳絮泡泡 算法基础篇 66 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。
Farmer John's N (1

Farmer John's N (1 <= N <= 100,000) cows, conveniently numbered 1..N, are once again standing in a row. Cow i has height Hi (1 <= Hi <= 1,000,000). Each cow is looking to her left toward those with higher index numbers. We say that cow i 'looks up' to cow j if i < j and Hi < Hj. For each cow i, FJ would like to know the index of the first cow in line looked up to by cow i. Note: about 50% of the test data will have N <= 1,000.

HBC24840ShiftandReverse,哈希[USACO 2009 Mar S]Look Up题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC24840ShiftandReverse 哈希[USACO 2009 Mar S]Look Up题解