#include #include #include using namespace std; using ll = long long; #include int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll n,k; cin>>n>>k; vector d(n); for(int i = 0;i>d[i]; atcoder::dsu uf(n); for(int i = 0;i