[Help] C++ Run time error for pointers based solution;

Revision en2, by Zealotrahl, 2022-11-09 14:59:03

Hi Codeforces community, can you help me to find the root of run time error in my solution for this problem 1428C - ABBB

Error is status_access_violation, google says it's something about pointers;

Submission link: 180179520

The approach is -> transform string to linked list of chars and when deleting two characters fix the "prev" for "next"; I generated "AB" strings up to 2^7, but it fails somewhere in 2^8, I'm not sure how to debug it; May be it's a memory leak issue?, I'm creating new pointers without deleting them, I tried using "delete pointer" but it did not help;

UPD

This was the solution https://codeforces.com/blog/entry/108880?#comment-971099

Tags c++, pointer, memory manipulation

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Zealotrahl 2022-11-09 14:59:03 97
en1 English Zealotrahl 2022-11-09 13:07:50 660 Initial revision (published)