I have observed there is significant performance difference between C++(gcc-4.3.2) and C++(gcc-4.0.0-8) Don't know the reason but C++(gcc-4.0.0-8) is significantly slower than C++(gcc-4.3.2). MY one solution which was getting tle got accpeted in C++(gcc-4.3.2).
also for others solution I have seen performance boost.