全RE求调

P2853 [USACO06DEC] Cow Picnic S

'''bool bfs(int u) { queue<int> q; q.push(u); st[u] = true; cnt[u]++; while(q.size()) { int t = q.front(); q.pop(); st[t] = true; for(int i = 1; i <= n; i++) if(!st[i] && i != t && g[t][i]) { q.push(i); cnt[i]++; } } } 没返回值
by zhoukun @ 2024-04-29 21:19:45


|