I got AC on this problem with a naive k*(2^k) solution .
Is there any other way to solve it using graph theory ?
Timus 1208. Legendary Teams Contest
I got AC on this problem with a naive k*(2^k) solution .
Is there any other way to solve it using graph theory ?