{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\n Give you a sequence and ask you the kth big number of a inteval. \n\u003c/div\u003e\n求区间第K小值。\n"}},{"title":"Input","value":{"format":"HTML","content":"The first line is the number of the test cases. \n\u003cbr\u003eFor each test case, the first line contain two integer n and m (n, m \u0026lt;\u003d 100000), indicates the number of integers in the sequence and the number of the quaere. \n\u003cbr\u003e The second line contains n integers, describe the sequence. \n\u003cbr\u003eEach of following m lines contains three integers s, t, k. \n\u003cbr\u003e[s, t] indicates the interval and k indicates the kth big number in interval [s, t]\u003c/br\u003e\n多组输入数据\u003c/br\u003e\n第一行两个整数n和m (n, m \u0026lt;\u003d 100000)\u003c/br\u003e\n第二行n个整数\u003c/br\u003e\n接下来m行,每行3个整数s,t,k.表示要查询区间[s,t]内第k小的。\u003c/br\u003e\n\n\n\n"}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output m lines. Each line contains the kth big number.\u003c/br\u003e\n输出相应的结果。\n"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e1 \n10 1 \n1 4 2 3 5 6 7 8 9 0 \n1 3 2 \u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e2\u003c/pre\u003e"}}]}