pk842's blog

By pk842, history, 5 years ago, In English

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!

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

»
5 years ago, # |
  Vote: I like it +3 Vote: I do not like it

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.