Comments

The key idea is that if any two nodes are not connected by an edge in the given graph then they cannot be in the same connected component as they will not form a clique. Now the problem is equivalent to finding chromatic number of the compliment graph which can be found here and can be done in O(n * 2^n)

On scanhexCodeforces Round #534, 8 years ago
0

thanks bro, i totally missed that

On scanhexCodeforces Round #534, 8 years ago
0

can anybody tell me what's wrong with my submission for problem C 48763210