#include using namespace std; using ll = long long; template using Pa = pair; template using vec = vector; template using vvec = vector>; int main(){ cin.tie(0); ios::sync_with_stdio(false); int N,P,Q; cin >> N >> P >> Q; P--; Q--; vec A(N); set s; for(int i=0;i> A[i]; A[i]--; s.insert(i); } auto ok = [&](int x){ bool p = false,q = false; set now = s; for(int i=0;i ans(N); bool p = false,q = false; for(int i=0;i