ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1613. For Fans of Statistics

Why AC with C++11 and TLE with C++
Posted by LastOne 31 May 2017 09:15
I used the same code
Re: Why AC with C++11 and TLE with C++
Posted by Mahilewets 31 May 2017 17:52
Your question is incorrect without code.  In C++ 11, there are a lot of new features.
Maybe just performance improvement of C++11 over earlier versions gives you AC.
Look for example for string class.  In C++98, strings are much slower,  than modern strings.

Your AC code runs in 800ms.  Mine just in 240.
http://acm.timus.ru/status.aspx?space=1&num=1613&author=201928
You can made a lot of optimizations.
After those optimizations,  you will get no TLE on G++4.9.