正文
增加 1 行删除 1 行
69 行未改动70717273747576777818 行未改动69 行未改动for(auto u : q) for(auto v : q){if(s[u] == s[v]){ll sm = 1;for(int i = head[u]; ~i; i = nxt[i]) for(int j = head[v]; ~j; j = nxt[j]){if(to[i] == F[u] || to[j] == F[v]) continue;int x = to[i], y = to[j]; sm += g[x][y]; if(sm>P) sm-=P;18 行未改动69 行未改动70717273747576777818 行未改动69 行未改动for(auto u : q) for(auto v : q){if(s[u] == s[v]){ll sm = 1;for(int i = head[u]; ~i; i = nxt[i]) for(int j = head[v]; ~j; j = nxt[j]){if(to[i] == F[u] || to[j] == F[v]) continue;int x = to[i], y = to[j]; sm += g[x][y]; if(sm>P) sm-=P;18 行未改动