MikeMirzuhanov's blog

By MikeMirzuhanov, history, 3 years ago, In English

My solution to the E1 problem of the 747 round (https://mirror.codeforces.com/contest/1594/problem/E1) exceeds memory limit?

Here is my solution $$$\to$$$ https://mirror.codeforces.com/contest/1594/submission/131228904

I thought it wasn't supposed to MLE 'cause the depth of the recursion was less than $$$2 * log(2^{61}) = 122$$$.

Sorry, dunno how to write blogs in Codeforces properly)

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

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

Cant say for sure but I think there will be an long long int overflow for variable b. Possibly b becomes negative and you enter an infinite recursion.

»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Click : Accepted