Serh.kry's blog

By Serh.kry, history, 7 years ago, In English

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?

Full text and comments »

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

By Serh.kry, 7 years ago, In English

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?

Full text and comments »

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

By Serh.kry, 8 years ago, In English

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.

Full text and comments »

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

By Serh.kry, history, 8 years ago, translation, In English

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

Full text and comments »

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