#include #include #include using namespace std; using ll = long long; int main(void){ int n, m; cin >> n >> m; vector> to(n); vector col(n, -1); for(int i=0; i> a >> b; a--, b--; to[a].push_back(b); swap(a, b); to[a].push_back(b); } auto dfs=[&](auto dfs, int now, int c=0)->bool { col[now]=c; for(auto p:to[now]){ if(col[p]==-1){ if(!dfs(dfs, p, c^1)) return false; } else{ if(col[p]==c) return false; } } return true; }; for(int i=0; i