我的P1197的代码中:
if(merge(u,sur[i]) && !book[u])cnt--;
会全WA,然而改成
if(!book[u] && merge(u,sur[i]))cnt--;
就AC了,这是为什么??
完整代码