{"trustable":true,"sections":[{"title":"题目描述","value":{"format":"MD","content":"输入一串数字,给你 $M$ 个询问,每次询问就给你两个数字 $X, Y$,要求你说出 $X$ 到 $Y$ 这段区间内的最大数。"}},{"title":"输入格式","value":{"format":"MD","content":"第一行两个整数 $N,M$ 表示数字的个数和要询问的次数; \r\n接下来一行为 $N$ 个数; \r\n接下来 $M$ 行,每行都有两个整数 $X,Y$。"}},{"title":"输出格式","value":{"format":"MD","content":"输出共 $M$ 行,每行输出一个数。"}},{"title":"样例","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\u003e10 2\n3 2 4 5 6 8 1 2 9 7\n1 4\n3 8\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\n8\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"数据范围与提示","value":{"format":"MD","content":"对于全部数据,$1\\le N\\le 10^5,1\\le M\\le 10^6,1\\le X\\le Y\\le N$。数字不超过 `C/C++` 的 `int` 范围。"}}]}