Bad Hair Day (POJ - 3250)--(糟糕的头发日)(单调栈)
Some of Farmer John’s N cows (1 ≤ N ≤ 80,000) are having a bad hair
day! Since each cow is self-conscious about her messy hairstyle, FJ
wants to count the number of other cows that can see the top of other
cows’ heads.
Each cow i has a specified height hi.
原创
2020-10-06 20:25:06 ·
141 阅读 ·
0 评论