import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.NoSuchElementException; public class Main{ public static void main(String[] args) { new Main().solve(); } void solve() { FastScanner sc=new FastScanner(); int N=sc.nextInt(); int M=sc.nextInt(); int[] cnt=new int[(int)2e5+1]; for (int i=0;i0 && a[p-1]>a[p]) --p; if (p==0) return false; int q=p; while (q+1