当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6959:zoto

题目描述
You are given an array $fx$.
For each $i (1<= i <=n)$ , we use a point $(i, fx[i])$ in $XoY$ coordinate plane to described it.
You are asked to answer $m$ queries, in each query there will be a rectangle and you need to count how many different y-cooordinate (of the points mentioned above) in the queried rectangle.
输入解释
The first line contains an integer $T (1<= T <=5)$ representing the number of test cases.
For each test case , there are two integers $n,m(1<=n<=100000,1<=m<=100000)$ in the first line.
Then one line contains n integers $fx[i] (0<=fx[i]<=100000)$
Each of the next m lines contain four integers $x_0,y_0,x_1,y_1(1<=x_0<=x_1<=n,0<=y_0<=y_1<=100000)$ which means matrix's lower-leftmost cell is $(x0,y0)$ and upper-rightest cell is $(x1,y1)$.
输出解释
For each test case print a single integer in a new line.
输入样例
1
4 2
1 0 3 1
1 0 4 3
1 0 4 2
输出样例
3
2

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6959

最后修改于 2021-10-23T19:10:49+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
5000/2500MS(Java/Others) 131072/131072K(Java/Others)