KKmonster's blog

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

Someone please help me find error in my code for this probelem. Problem C Educational Round 65. I am getting MLE. Any help would be appreciated. https://codeforces.com/contest/1167/submission/54526141

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

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

Auto comment: topic has been updated by KKmonster (previous revision, new revision, compare).

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

Sorry for dont help in your code, but there's a simpler code than yours. It consists only of Union-Find Data Structure. It's a straight-forward algorithm for solving this problem. Hope this helps!