#include using namespace std; // Correctly randomises the pivot but doesn't filter out repetitions // of the same value when partitioning, so big arrays of identical // values kill it. template void quicksort(T beg,T end){ if (beg==end or beg+1==end) return; auto const pivot=beg[rand()%(end-beg)]; auto l=beg,r=end-1; for (;;){ while (l<=r and (*l>n; vector v(n); for (auto &i: v) cin>>i; quicksort(v.begin(),v.end()); long double res=1.L; for (int i=n; i--;){ if (v[i]>i+1){ cout<<"impossible"<