#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll INF=1LL<<60; typedef pair P; typedef pair PP; const ll MOD=998244353; int main(){ int N,K; cin>>N>>K; vector A(N); for(int i=0;i>A[i]; map mp; for(int i=0;i pq; for(auto [v,num]:mp){ pq.emplace(num,v); } set ans; int cnt=0; while(cnt