{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\nMathJax.Hub.Config({\n tex2jax: {inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]], displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]}\n});\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async\n src\u003d\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\"\u003e\n\u003c/script\u003e\n\nЗадано **n** точек в одномерной плоскости и **q** отрезков, Вам нужно для каждого отрезка вывести количество точек в ней. Точка **p\u003csub\u003ei\u003c/sub\u003e** в отрезке **A B** если **A \u0026le; p\u003csub\u003ei\u003c/sub\u003e \u0026le; B**.\n\nНапример возьмем **1, 4, 6, 8, 10** точек. И отрезок от **0** до **5**. Ответом будет **2** поскольку только точки **1** и **4** на данном отрезке.\n"}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 5)**, denoting the number of test cases.\n\nEach case starts with a line containing two integers **n (1 \u0026le; n \u0026le; 10\u003csup\u003e5\u003c/sup\u003e)** and **q (1 \u0026le; q \u0026le; 50000)**. The next line contains **n** space separated integers denoting the points in ascending order. All the integers are distinct and each of them range in **[0, 10\u003csup\u003e8\u003c/sup\u003e]**.\n\nEach of the next **q** lines contains two integers **A\u003csub\u003ek\u003c/sub\u003e B\u003csub\u003ek\u003c/sub\u003e (0 \u0026le; A\u003csub\u003ek\u003c/sub\u003e \u0026le; B\u003csub\u003ek\u003c/sub\u003e \u0026le; 10\u003csup\u003e8\u003c/sup\u003e)** denoting a segment.\n"}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number in a single line. Then for each segment, print the number of points that lie in that segment.\n"}},{"title":"Sample Input","value":{"format":"MD","content":"\u003cpre\u003e1\n5 3\n1 4 6 8 10\n0 5\n6 10\n7 100000\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"MD","content":"\u003cpre\u003eCase 1:\n2\n3\n2\n\u003c/pre\u003e"}},{"title":"Note","value":{"format":"MD","content":"Dataset is huge, use faster I/O methods.\n"}}]}