Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

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

Автор Windycaution, история, 10 месяцев назад, По-английски

Hello folks on CodeForces. I came across with a problem adapted from a CodeForces problem (one of my seniors, whom I cannot get contact, used it in our exams, and his tutorial is too intricate for me T_T). So I'd appreciate it if any mates recognise this statement and can tell me its source problem.

Thanks in advance! ❤

Statement: There are two multisets $$$A$$$ and $$$B$$$, both initially empty. And there are $$$m$$$ operations, in one of which a pair of two integers $$$(a_i, b_i)$$$ will be added into/deleted from either $$$A$$$ or $$$B$$$. After every operation, find the minimum of $$$\max(a_x+a_y, b_x+b_y)$$$, where $$$x \in A, y \in B$$$.

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

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

Автор Windycaution, история, 2 года назад, По-английски

Hello, I have recently got haunted by telling the size of memory pool of persistent segment tree, getting WA / RE / MLE results on many problems. Therefore, I'd appreciate it if someone could give me a implementation of persistent segtree applying std::vector to manage the memory (in order to avoid getting WA / RE / MLE by telling wrongly the size of arrays), which I could not find one anywhere on the Internet.

If the code could be laconic as well, it would be better.

Thank you!

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

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