摘要:
You are given an array of N integers. You should support the following queries on this array. 0 L R : Find the minimum integer in the range AL, AL+1, 阅读全文
摘要:
题目链接 题意 多个矩形重叠在一起,求出轮廓线的长度。 分析 把矩形分成横线和竖线来处理。现在分析横线的,竖线同理。矩形的坐标都是整数,且范围不大,故此题不需要离散化。从下往上扫描横线,每遇到一条横线,就计算长度,矩形的下边标为1,上边标为-1。具体计算方法是此次区间的总覆盖长度与上次区间长度相比, 阅读全文