1.000s
128MB
第一行一个整数lns="http://www.w3.org/1998/Math/MathML">nn。lns="http://www.w3.org/1998/Math/MathML">(1 \le n \le 10^5)(1≤n≤105) 第二行lns="http://www.w3.org/1998/Math/MathML">nn个整数lns="http://www.w3.org/1998/Math/MathML">a_iai表示在进站口的编号。lns="http://www.w3.org/1998/Math/MathML">(1 \le a_i \le n, a_i \ne a_j)(1≤ai≤n,ai!=aj)
如果可以变为升序输出"Yes",反之输出"No"。
3 3 1 2
Yes