#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n; vector l(n); for(Int i=0;i>l[i]; using P = pair; priority_queue

pq; for(Int i=0;i dp(MAX); vector sz(n,1); for(Int i=1;i>q; while(q--){ Int k; cin>>k; cout<