+ 6

What do Run Time Error and Time Limited Exceeded means? And how to solve them?

4th Mar 2018, 11:28 AM
Muhammad Natsir
Muhammad Natsir - avatar
2 Respuestas
+ 1
Runtime Errors indicates all the errors the program performs .. the commons are invalid memory reference or in math operations for example divide by zero or overflow. about time limited exceeded you have to know that the judges give a specific time limit to every problem. in case the program doesn't terminate in that specified time limit you will get this error. the program doesn't terminate because of two possible reasons : the first is the algorithm by itself , infact if it's too slow compared to the time limit , even if it's correct it will not terminate in time. so the solution is to change algorithm. the second instead can happens in case of recursive functions or infinite loops , infact if a while operation or just a function call itself infinite times will of course not finish in time . in this case it's a bug which produces infinite loop.
4th Mar 2018, 4:17 PM
Alessio Bocini
Alessio Bocini - avatar
+ 1
ayee thanks!
4th Jul 2018, 3:17 PM
Kai