+ 3

When i run my program, why output shows "time limit exceed" ?

it happened many times

28th Oct 2016, 9:20 PM
Shruti Singh
Shruti Singh - avatar
2 Antworten
+ 2
Another way. When you using some online developer compiler and running tools, like here in sololearn, there is usually a limitation for sources- A memory, using of procesor, and a time of running too. Because this server use maybe hundreds or thousands people common. The limit is sufficient for running short examples here. But when your programs gets into bad endless loop, the limit is exhausted and program is stopped, Of course, if you develope program main in your computer, there is not time limit, and your program with bad endless loop can run for ages, so you have to break it manually..
29th Oct 2016, 12:41 AM
Petr Hatina
Petr Hatina - avatar
+ 1
That means something in your program lasts too long. Maybe it gets into infinite loop, or makes like 10^12 operations etc. If you are getting this in some online judge, or competition, you just need to make more efficient algorithm.
28th Oct 2016, 9:25 PM
Daniel Oravec
Daniel Oravec - avatar