andrewmca's blog

By andrewmca, history, 3 years ago, In English

My solution 218997954 gives MLE, and I'm not sure why. I use O(q) memory for q <= 10^6, which should be within the 256 MB limit.

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
3 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I think it's probably a Runtime Error

»
3 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

line 55 you perform a loop with k--, then line 63 you push {true, k} to stack which k is always -1.