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

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

I'm sorry to have delayed posting this entry for about an hour, and that Codeforces Round #464(Div.2) is beginning soon after this contest.

The address of the contest is here. Take part if you're willing to do some "exercise".

I regret to say that the statements are provided in Mandarin. You can use google translate for translation if necessary.

That's all. Thanks for your attention.

UPD: I've completed the English version of the editorial. Click here to have a look.

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

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

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

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

Is the idea for the second problem to use map of counts in a segment tree and then binary search on the answer index? I think the segment tree should be amortized log n per query, because each segment is written over at most once, and if it is a bigger segment, then the smaller ones it contains only do one rewrite. I went to sleep before actually trying it (also because I had no idea what the XOR part of the problem input was asking, google translate and my limited skill couldn't help me).

edit: after busting 4 hours on this algorithm it's still too slow for the strict 1200 ms limit (unordered_map snail life, I guess). Looks like it's time to learn this "split-merge-treap"

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

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