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

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

Hello I recently learned DCP trick. I had tried implementing it but my implementation give WA on DYNACON1 of SPOJ and MLE on CF 100551.

Can someone please suggest what is wrong in the solution or can give any better implementations?

Thanks!

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

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

1217 F — DCP with offline sqrt decomposition — 60316117. Note — This is not very effecient code, I used dfs instead for rollbacks. For segtree solution check blog by adamant, it contains implementation by inventor of that technique or check this blog https://codeforces.com/blog/entry/65629.

For problem 100551A make sure that I/O is via files.