• Welcome to Computer Association of SIUE - Forums.
 

Sphere Online Judge

Started by William Grim, 2006-09-23T00:30:46-05:00 (Saturday)

Previous topic - Next topic

William Grim

For those of you that like to solve ACM or TopCoder problems, here is something else you can try: Sphere Online Judge.

In particular, I found this problem quite enjoyable.  I tried it in Python but couldn't get Python to run quickly enough.  I redid it in C, and it ran quite nicely but still has room for improvement: https://www.spoj.pl/problems/PALIN/.
William Grim
IT Associate, Morgan Stanley


blacklee

Figuring out compilers issues seems to be an ongoing problem for me with the online judge. Does anyone else have this problem?. Probably some detailed instructions are out there somewhere, I just can't find them. I even remember Andrew explained it to me on this forum, but I can't find that post now either.  :cry:

Mike, my program doesn't compile with the judge. I get compilation errors "function is not declared in this scope." I'm sure it has something to do with the compiler, because it runs fine in Visual Studio. Any ideas?

William Grim

Make sure you're uploading your code with the compiler set to "g++", not "gcc".  Also, it's best to test your code on home.cs.siue.edu before you upload, because VS2005 is not as standards-compliant as GCC.  GCC will tell you about a lot of errors that VS2005 will ignore.
William Grim
IT Associate, Morgan Stanley

blacklee

Thanks Mike, it worked. I can't believe some of the errors VS ignored.
How do some people get 0.01 run time? I wish I could see their code. Replacing cin/cout with scanf/printf cut down time from 1.14 to 0.24 for me; but changing functions to inline and doing bitwise instead of arithmetic operations   :oops:  didn't affect timing much.
Does the program run time matter in the live contest?