#include using namespace std; vector a[2001]; stack st; stack members,resstack; int tmp=0,br=0,maxtmp=-1,maxbr; int ss[2001]; bool used[2001]; void res(int r) { maxtmp=r; maxbr=br; resstack=st; } void dfs(int p) { ///cout<maxtmp) { res(tmp); } used[p]=true; while(!st.empty()) { p=st.top(); bool f=false; for(int j=0; jmaxtmp) { res(tmp); } used[a[p][j]]=1; f=true; break; } } if(!f) { tmp-=(br*st.top()); br--; st.pop(); } } } int main() { int n, m,u,v; cin >> n >> m; for(int i=0; i>u>>v; a[u].push_back(v); a[v].push_back(u); } /*for(int i=1; i<=n; i++) { cout<<"vruh "< kappa; swap(members,kappa); stack s1; swap(s1,st); br=0; tmp=0; dfs(k); } cout<