import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.Comparator; import java.util.NoSuchElementException; public class Main{ public static void main(String[] args) { new Main().solve(); } void gen() { int N=200000; int P=1; int Q=N; int[] a=new int[N]; for (int i=0;i=0;--i) if (A[i]==key) return i; throw new AssertionError(); } void solve() { FastScanner sc=new FastScanner(); int N=sc.nextInt(); int P=sc.nextInt(); int Q=sc.nextInt(); int[] A=new int[N]; for (int i=0;i=iq;--i) max=Math.max(max, A[i]); if (max==Q) { while (iq>=0 && A[iq]<=Q) --iq; } Arrays.sort(A, iq+1, N); { int s=iq+1; int t=N-1; while (s0&&A[iq-1]==Q)) break; } int ip=find(A, P); int iq=find(A, Q); for (int i=iq;i0 && a[p-1]>a[p]) --p; if (p==0) return false; int q=p; while (q+1