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

Автор hahavodox, история, 7 лет назад, По-английски

Recently I came across a technique similar to Policy based DS, a Policy Based Persistent BIT. To basic idea is to keep the BIT balanced by HLD. Naive algo is O(n^2). But you have to optimize using bitset to make it O(nlog n). You can perform dynamic range update range query and orthogonal range minimum IDA* search easily in O(Nlog N).

Example:http://codeforces.com/contest/869/problem/E

This can be solved with this trick easily combining this with Baby Step Giant Sweep line along with persistent KSAT.

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

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

.

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

It'd be helpful if you posted an implementation. Also, what is range minimum ida* search. Google tells me it's iterative deepening, but it's unclear how that applies here.

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

    not sure if you actually didn't got the troll technique right or just contributing to it.

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

      Can't say I realized it was a troll. The IDA* search part and KSAT were strange, but nothing else really made it clear to me that they were trolling...

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

Blogs like these are why I still browse codeforces.

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

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