Your code allocated too little for path (2n-2 for n = 50000) so it invoked an 
undefined behavior.

On Monday, April 8, 2019 at 12:33:10 PM UTC-5, Felik Junvianto wrote:
> I found my solution to receive MLE verdict on this problem (for last 
> subtask). I am not sure where did I go wrong since I just used an array of 
> 50,000 size char (so roughly ~50MB) and the memory limit on the problem 
> statement is 1 GB.
> 
> Then I changed it to read one char at a time and it passed the last subtask. 
> Is there a different calculation about how much the memory being used? 
> Because I am really positive my program used way less than 1GB memory limit.
> 
> Then I changed it to read per char instead of whole string and got AC 
> verdict. Can you guys help finding out what's wrong with my MLE solution?
> 
> MLE Solution: https://ideone.com/9AjjAX
> 
> AC Solution: https://ideone.com/gnrAz2
> 
> Thank you very much.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/aede6381-d326-4f23-86cc-c506c45106df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to