{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\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 type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e你得到一个排列$$$p_1, p_2, \\dots, p_n$$$. 回想一下,如果 $$$n$$$个整数的序列恰好包含从 $$$1$$$ 到 $$$n$$$ 的所有整数,则称为置换。\u003c/p\u003e\n\u003cp\u003e找到三个索引$$$i$$$, $$$j$$$ 和$$$k$$$,使得:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003e$$$1 \\le i \u0026lt; j \u0026lt; k \\le n$$$;\u003c/li\u003e\n \u003cli\u003e$$$p_i \u0026lt; p_j$$$ 和 $$$p_j \u0026gt; p_k$$$\u003c/li\u003e\n\u003c/ul\u003e或者说没有这样的索引。"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e第一行包含一个整数 $$$T$$$ ($$$1 \\le T \\le 200$$$)\u0026nbsp;— 测试用例的数量\u003c/p\u003e\n\u003cp\u003e接下来的$$$2T$$$行包含测试用例\u0026nbsp;—每个测试用例两行。每个测试用例的第一行包含单个整数$$$n$$$ ($$$3 \\le n \\le 1000$$$)\u0026nbsp;— 排列的长度 $$$p$$$.\u003c/p\u003e\n\u003cp\u003e第二行包含 $$$n$$$个整数 $$$p_1, p_2, \\dots, p_n$$$ ($$$1 \\le p_i \\le n$$$; $$$p_i \\neq p_j$$$ if $$$i \\neq j$$$)\u0026nbsp;— 排列$$$p$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e对于每个测试用例:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003e如果有这样的索引 $$$i$$$, $$$j$$$ and $$$k$$$, 打印\u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e (case insensitive) 和索引本身;\u003c/li\u003e\n \u003cli\u003e如果没有这样的索引,打印\u003cspan class\u003d\"tex-font-style-tt\"\u003eNO\u003c/span\u003e (不区分大小写).\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e如果有多个有效的索引三元组,则打印其中任何一个。\u003c/p\u003e"}},{"title":"Sample 1","value":{"format":"HTML","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\n4\n2 1 4 3\n5\n5 3 1 2 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\n2 3 4\nNO\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}