aman_naughty's blog

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

Your title here...I am following the editorial for this problem 489D - Unbearable Controversy of Being and am getting TLE on test case 7. 55729287

Can someone point out what is the difference between my implementation and Mike's.

Your text to link here...

I am also using brute force of selecting the two end nodes and then counting the number of intermediate nodes which provide path length of 2 between the selected nodes.

Anyone out there???

 
 
 
 
  • Vote: I like it
  • -16
  • Vote: I do not like it

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

Help me please ....

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

Apart of the useless code you put in your submission, why are you using an unordered set? It can be linear in the worst case

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

    I am using unordered_set so that I am able to check whether the middle element is having c as it's child or not in O(1).

    Also "thy shall not judge others" code bitchLasagna XD.

    Now Maybe This post will be removed and I will get a system warning.

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

Help me....

»
3 weeks ago, # |
  Vote: I like it -12 Vote: I do not like it

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

»
3 weeks ago, # |
  Vote: I like it -10 Vote: I do not like it

Help Help Help Help Help..................................................................................................

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

Help or tell me the problem in my approach.

P.S I am four downvotes away from a Century XD

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

I am 3 downvotes away from a Century . Help me to achieve that atleast if not for the question XD

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

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