{"trustable":false,"sections":[{"title":"描述","value":{"format":"HTML","content":"\u0026emsp;HIEU每年都会在学校图书馆举行书法展览,今年学校图书馆展示了$m$位同学的书法。学生通过门口的微信小程序进入图书馆必须说出两个数字,$L$和$R$,代表他\u003cb\u003e本次\u003c/b\u003e要看展览中的第$L$幅到$R$幅书法(包含$L$,$R$)之间的所有书法。\u003cbr\u003e\n\u0026emsp;小z老师希望进入后看到所有学生的书法。同时,小z老师想要\u003cb\u003e最小化\u003c/b\u003e进入图书馆的次数。\u003cbr\u003e\n\u0026emsp;请帮助小z老师每次进入图书馆时应该如何选中$L$,$R$。如果存在多组解,\u003cb\u003e输出$L$最小的那组\u003c/b\u003e。"}},{"title":"输入","value":{"format":"HTML","content":"第一行两个整数 $n,m$($1\\leq n\\le10^6; 1 \\leq m\\le2\\times10^3$),分别表示图书馆内的书法总数及这些书法是由多少位学生的所书写的。\u003cbr\u003e\n第二行包含 $n$ 个整数 $a_i$($1 \\leq a_i \\leq m$),代表书写第 $i$ 幅书法的学生的编号。"}},{"title":"输出","value":{"format":"HTML","content":"一行两个整数 $L,R$。"}},{"title":"样例 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003e输入\u003c/th\u003e\n \u003cth\u003e输出\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e12 5\n2 5 3 1 3 2 4 1 1 5 4 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2 7\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}