muratt's blog

By muratt, 3 years ago, In English

Hello Codeforces community,

I would like to invite you to join HackerRank's 101 Hack 55 which starts at 1500 UTC, July 2, 2018.

There will be five tasks and three hours for you to solve them. The contest will be rated and the top ten contestants will receive HackerRank T-shirts!

The problems are prepared by me, muratt. kevinsogo tested the problems and he found them to be interesting. I hope you'll enjoy the problems as much as he did!

Happy Coding!

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

»
3 years ago, # |
  Vote: I like it +18 Vote: I do not like it

Can someone explain a solution for "Special Set Pairs"?

  • »
    »
    3 years ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    trick is to construct a tree, first notice that if f(a, b) = 0, f(b, c) = 0 then f(a, c) = 0 (a<b<c). so you just have to find nearest j for all i that f(i,j)=0.Then put an edge between them. So that all ancestors of a node a gives 0 in our function.

»
3 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Registered for event several weeks ago, but received no remainder.

»
3 years ago, # |
  Vote: I like it -11 Vote: I do not like it

How to solve problem B i cannot understand editorial greedy approach.Plz help me