[Problem 50] CPU time limit exceeded (core dumped)

Back to Problem Solutions forum

gravoo     2014-12-21 20:42:54

Hi guys. I have solved the palidrom problem and get the correct answer but when i try to complie my source code here, in service I get the error "CPU time limit exceeded (core dumped)". Is that becouse my code sucks or what? It looks like this http://pastebin.com/ScuTAjZb

Rodion (admin)     2014-12-22 09:06:25
User avatar

Hi! I see that colleague Quandray left the comment for your solution. funny: I thought no one uses comments at all

Your code probably could be made somewhat faster (palindrom problems have some funny approaches, I believe), but this problem does not require you to write optimal code :)

However the service which helps us running codes in site have some limitations - among them on execution time. As long as you can run the code at your own machine this will not create much trouble for you, I hope.

gravoo     2014-12-22 14:36:52

A ok, but i found the issue. At the end of the imput text there is no new line ("\n") character thats why my program fails on the server.

Please login and solve 5 problems to be able to post at forum