### Vedkribhu's blog

By Vedkribhu, history, 7 months ago,

For some testcases I am getting a run time error while it runs fine on my local machine. Problem code. Any help would be awesome.

• -4

 » 4 weeks ago, # | ← Rev. 2 →   0 you might be declaring a 1-d or 2-d array of size>2*10^6. so for lower values it work fine on local compiler but solution can't be accepted due to size overflow.
•  » » 4 weeks ago, # ^ |   +2 Given that it's been 6 months, I'm not sure the OP still needs help. But I would like to point out that 2 * 106 fits comfortably in 512MB.You were still right about the error though. The OP is creating an array of size N * X. N ≤ 103 and X ≤ 105, which means that 108 long longs will be created. This will cause MLE.
•  » » » 3 days ago, # ^ |   0 what is solution for this MLE problem ? can you explain please. it would be helpul
•  » » » » 2 days ago, # ^ |   0 The short answer is that you need to write a solution that uses less memory. That's what Memory Limit Exceeded means.The long answer depends on what solution you have right now.
 » 4 weeks ago, # |   0 Spoiler4 578 906 666 655 460 287 275 848 564 Your answer: 0Correct answer: 564 I don't know about the RE, but your solution fails on this input.