Блог пользователя Serh.kry

Автор Serh.kry, история, 8 лет назад, По-английски

Can ternary search always be replaced by binary search with compare of f(x) and f(x + eps)?

I mean what is the point of cutting 1/3 when we can cut 1/2 and have error = eps?

Полный текст и комментарии »

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

Автор Serh.kry, 8 лет назад, По-английски

There was the problem on the last contest which was solved with bit approach by some of top participants: one, two. I just can't understand how it works. Can someone explain?

Полный текст и комментарии »

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

Автор Serh.kry, 8 лет назад, По-английски

What to do in such case? Some time ago I've been solving the problem, which could be a trouble for me if all the values wasn't different.

Полный текст и комментарии »

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

Автор Serh.kry, история, 8 лет назад, По-русски

Here is the problem I'm trying to solve. Help me please to find a solution.

There are some segments that have start and end point on coordinate line. Each time we can eliminate one pair of intersecting segments.

The problem: how to maximize the count of eliminated segments?

Each time we removing one pair we might break another one. If one segment is intersecting several another segments, how to select the right one to eliminate as pair with former?

Example of elimination process:
8 segments was removed

Полный текст и комментарии »

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