Блог пользователя muratt

Автор muratt, 6 лет назад, По-английски

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!

  • Проголосовать: нравится
  • +32
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

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

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +10 Проголосовать: не нравится

    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.

»
6 лет назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

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

»
6 лет назад, # |
  Проголосовать: нравится -11 Проголосовать: не нравится

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