{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"MD","content":"一条道路上有$N$个点,每个点有高度$h_i$。\n举世闻名的马里奥来挑战这条道路。\n现在,你需要回答$M$个询问,每个询问如下:\n假设马里奥最多跳$H$这么高,在区间$[l,r]$中,马里奥能跳过多少个点。(不考虑他被挡住)\n\n即询问区间$[l,r]$内有多少个数**不大于**$H$。"}},{"title":"Input","value":{"format":"MD","content":"第一行一个整数$T$,表示共$T$组数据。\n对于每组数据:\n第一行包含两个整数$N, M(1 \\leq N \\leq 10^5, 1 \\leq M \\leq 10^5)$, $N$表示道路的程度, $M$是询问的个数。\n第二行包含$N$个整数,表示每个障碍物的高度$h_i(0\\leq h_i\\leq 10^9)$。\n接下来$M$行,每行$3$个整数$L,R,H(0\\leq L\\leq R\u003c N, 0\\leq H\\leq 10^9)$。"}},{"title":"Output","value":{"format":"MD","content":"对于每组数据, 先输出\"**Case X:**\" (X表示组数)\n然后有$M$行每行包含一个整数。\n第$i$个整数表示第$i$个询问的答案。"}},{"title":"Sample Input/Output","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e1\n10 10\n0 5 2 7 5 4 3 8 7 7 \n2 8 6\n3 5 0\n1 3 1\n1 9 4\n0 1 0\n3 5 5\n5 5 1\n4 6 3\n1 5 7\n5 7 3\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003eCase 1:\n4\n0\n0\n3\n1\n2\n0\n1\n5\n1\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}