{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"\u003ca href\u003d\"https://lightoj.com/problem/array-queries?fbclid\u003dIwAR01txSXEZajYpwP31Fi5HhmagBnYgXi9xn_PqkD3DjtODD8zEGryrGmZKY\"\u003eProblem Link\u003c/a\u003e"}},{"title":"","value":{"format":"MD","content":"Given an array with **N** elements, indexed from **1** to **N**. Now you will be given some queries in the form **I J**, your task is to find the minimum value from index **I** to **J**.\n"}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 5)**, denoting the number of test cases.\n\nThe first line of a case is a blank line. The next line contains two integers **N (1 \u0026le; N \u0026le; 10\u003csup\u003e5\u003c/sup\u003e)**, **q (1 \u0026le; q \u0026le; 50000)**. The next line contains **N** space separated integers forming the array. There integers range in **[0, 10\u003csup\u003e5\u003c/sup\u003e]**.\n\nThe next **q** lines will contain a query which is in the form **I J (1 \u0026le; I \u0026le; J \u0026le; N)**.\n"}},{"title":"Output","value":{"format":"MD","content":"For each test case, print the case number in a single line. Then for each query you have to print a line containing the minimum value between index **I** and **J**.\n"}},{"title":"Sample","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\u003e2\n\n5 3\n78 1 22 12 3\n1 2\n3 5\n4 4\n\n1 1\n10\n1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1:\n1\n3\n12\nCase 2:\n10\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"MD","content":"Dataset is huge. Use faster I/O methods."}}]}