Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

来自FAQ的回答。大家可以看看。

Posted by tdzl2003 at 2005-07-27 21:14:30 on Problem 2511
In Reply To:我晕~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Posted by:Volcanon at 2005-07-27 21:14:09
Q: My program gets WA/TLE/RE with G++/GCC, but it's AC with C/C++ (or vice versa)!

A: It's probable that some tiny bugs hide in your AC code but due to compiler factors they doesn't take visible effect. It's recommended that you revise your code to fix the bugs. Another possible cause is the differences in default settings of code generation of compilers. For example, the stack size of programs compiler by VC is larger than that of those compiled by GCC/G++. Then a program relying on extremely deep recursion may possibly fail with GCC/G++. If you strongly believe (with sufficient evidence) it's caused by bugs of the compiler, please let us know.

 

Q: My program gets TLE with C/C++ but AC with GCC/G++! I'm sure there can't be any bugs in it.

A: Tests show that loops run much faster when compiled by GCC/G++ than by VC. The STL of G++ is also faster than that of VC. So when you are frustrated by such TLE's you may try using GCC/G++. Perhaps they may earn you an AC. Still we recommend you get AC with a more efficient code. If you strongly believe the time limit (whether total time limit or case time limit) for a problem is much too tight, please also let us know.


Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator