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

Compiler time differences
Posted by Tural Neymanov 17 Jan 2015 15:07
So my algo is to have a vector of pairs(value and index),
sort them(used usual <algorithm> sort), and then binary
searched each request - first by value, and if value was
correct, by index.

The program ACed, on G++11 compiler with 0.921 time. when
I removed the inclusion of <cstdlib>, it ACed with
0.859(and same on G++14). But funny thing is, on
Visual C++ 2010, it ACed with 0.593s time, which is
astounding(to me at least) because the difference is
quite noticeable(25% drop).

So I guess if you are getting TLE, it's worth a try
to run it with Visual C++ - you might get a pass this way.

Edited by author 17.01.2015 15:10