How to Solve this in O(T*NLogN) time ?

Revision en1, by Aakash_DD, 2018-11-20 12:48:18

I was solving some problems from contests but can't figure out how to solve this problem in the given time constraints.

My attempts: 1. I was making the brute force solution O(n^2). 2. I thought for Graphs and Connected components size but I m not able to do under given constraints.

Tags #graph, #codechef, biconnected-components

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Aakash_DD 2018-11-20 12:48:18 380 Initial revision (published)