#pragma GCC optimize ("O3") #pragma GCC target ("avx2") #pragma GCC optimize("unroll-loops") #include using namespace std; using Int = long long; const char newl = '\n'; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a void drop(const T &x){cout< vector read(size_t n){ vector ts(n); for(size_t i=0;i>ts[i]; return ts; } template V compress(V vs){ sort(vs.begin(),vs.end()); vs.erase(unique(vs.begin(),vs.end()),vs.end()); return vs; } template map dict(const vector &vs){ map res; for(int i=0;i<(int)vs.size();i++) res[vs[i]]=i; return res; } map dict(const string &s){ return dict(vector(s.begin(),s.end())); } //INSERT ABOVE HERE const int MAX = 1e5+10; using ll = long long; ll bs[MAX]; signed main(){ cin.tie(0); ios::sync_with_stdio(0); int n,m; cin>>n>>m; // auto bs=read(n); for(int i=0;i>bs[i]; vector ls(m),rs(m); for(int i=0;i>ls[i]>>rs[i],ls[i]--; vector> G(n); for(int i=0;i