dutinmeow's blog

By dutinmeow, history, 7 weeks ago, In English

I am having trouble debugging my persistant li chao tree code for this problem (I know it's not a PLI problem but I need a place to test my code). My code is correct for most small manually generated tests.

Code

Edit: I realized it was something wrong with the driver code (x-coordinates could be negative). If anybody is still interested, my working code can be found here

 
 
 
 
  • Vote: I like it
  • +15
  • Vote: I do not like it

»
7 weeks ago, # |
  Vote: I like it -19 Vote: I do not like it

I think you are picking the wrong platform to ask this on.

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

"persistant"

»
5 weeks ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

I tested your code and it seems working only when we update the version 0 of the LiChao Tree. In other words, your code isn't working properly when trying to copy a version to a new one.

This is how I tested your code:

Testing Code

It works fine that way, but as soon as I call to ds.copy() it crashes.

UPD: Unluckily (or maybe luckily), the problem where you submitted that code doesn't require to use the PersistantLiChao::copy method, hence you got AC with a wrong template.