Reminder: in case of any technical issues, you can use the lightweight website m1.codeforces.com, m2.codeforces.com, m3.codeforces.com. ×

### Ahmed-'s blog

By Ahmed-, history, 8 months ago, ,

For problem 1114F - Please, another Queries on Array?:

Does someone has an idea why this submission 49746866 gets WA test 3 (with 17M memory) while this one 49746950 gets MLE in the same test (with 256M Memory) where the only difference in the power function (Iterative vs Recursive)?

• 0

 » 8 months ago, # | ← Rev. 2 →   +14 In iterative code, you defined p as unsigned int, but in recursive one it is int, so, if we suppose that temp can be negative (because of a wrong in range query, for example), there will be no issues in iterative code, but there will be infinite calls in recursive code (because p < 0).
•  » » 8 months ago, # ^ |   +3 Thank you, that was a silly mistake :D