Codechef Jan-14 Sereja and graph in C++