POJ 3250 Bad Hair Day (单调栈)
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
原创
2017-07-10 08:50:56 ·
554 阅读 ·
0 评论