codeforces2k19's blog

By codeforces2k19, history, 4 weeks ago, In English,

Please explain me how to approach this problem(I am a beginner): http://codeforces.com/contest/1167/problem/C

 
 
 
 
  • Vote: I like it
  • +4
  • Vote: I do not like it

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hint: The code consists only of Union-Find Data Structure. It's a straight-forward algorithm for solving this problem. Hope this helps! A link that may help: https://www.geeksforgeeks.org/union-find/

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

You are beginner? Even beginners should know how to read editorials right? Unless you tell me that you don't know where the editorial is. If you don't understand the editorial, please mention it in your post lest I assume that you didn't bother to read it.