{"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":"HTML","content":"给定一个数列,问给定一个区间的中间的那个数是多少;"}},{"title":"Input","value":{"format":"HTML","content":"For each test case, the first line contains a single integer n (1 \u0026lt;\u003d n \u0026lt;\u003d 100,000) indicating the total number of problems. The second line contains n integers xi (0 \u0026lt;\u003d xi \u0026lt;\u003d 1,000,000,000), separated by single space, denoting the difficultness of each problem, already sorted by publish time. The next line contains a single integer m (1 \u0026lt;\u003d m \u0026lt;\u003d 100,000), specifying number of queries. Then m lines follow, each line contains a pair of integers, A and B (1 \u0026lt;\u003d A \u0026lt;\u003d B \u0026lt;\u003d n), denoting that Mr. B needed to choose a problem between positions A and B (inclusively, positions are counted from 1). It is guaranteed that the number of items between A and B is odd."}},{"title":"Output","value":{"format":"HTML","content":"For each query, output a single line containing an integer that denotes the difficultness of the problem that Mr. B should choose. \n\u003cbr\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e5\n5 3 2 4 1\n3\n1 3\n2 4\n3 5\n5\n10 6 4 8 2\n3\n1 3\n2 4\n3 5\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003eCase 1:\n3\n3\n2\nCase 2:\n6\n6\n4\u003c/pre\u003e"}}]}