{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"The introduction of Metro Rail in Dhaka is a groundbreaking advancement in the realm of transportation, as it promises to alleviate the issue of traffic congestion in the city. This new system allows citizens to travel with unprecedented speed and convenience, providing a much-needed solution to the long-standing problem of gridlock on the city\u0027s roads. But the problem is, day by day this system will be mismanaged by us. We will make it dirty, the area will be crowded with unexpected people like pickpocketer, hawkers, drug sellers, Badamwala, and so on. \n\nTo ensure the system remains safe and reliable for all passengers, Bangladesh Government assigned a few number of security guards in total **N** stations and you are assigned to monitor the vulnerabilities.\n\nYour first task is to travel from station **I** to **J** for **q** times per day, and notice the least number of security guards than in other stations you traveled."}},{"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** as per the sample output."}},{"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."}}]}