Page 1 of 1

same env as judge...

Posted: Sat Apr 24, 2004 4:32 pm
by mirek.rusin
..does anybody know if there is somewhere on the net compiler-pack, same as judge.
i mean - without restricted functions, same stl implementation, etc?

Posted: Sat Apr 24, 2004 5:30 pm
by anupam
As far as I know, they wrote and changed some functions of bash and c compiler so that it works in that manner. I don't know whether it is true or not. Hope others will help you.

Posted: Sat Apr 24, 2004 9:38 pm
by Krzysztof Duleba
The OJ works on gcc 2.95. The comment made by anupam has nothing to do.

Posted: Mon Apr 26, 2004 6:15 pm
by anupam
Oh! Thank you for your correction. Right you are. I answered wrong. I thought he wanted to know how special features of the compiler of judge (restricted function, no file access) works.
The later post is correct. It works on gcc .
Thank you.

Posted: Fri Apr 30, 2004 9:28 am
by alexkro
Krzysztof Duleba wrote:The OJ works on gcc 2.95.
Pardon for my harshness, but gcc 2.95 - it's just a shame! Valladolid is boasting of using the advanced OS and software (http://acm.uva.es/problemset/computer.html), and at the same time - gcc2.95 which is an ancient, ancient compiler. It just sucks, did you know that gcc3.4 existed? Install at least gcc3.2, is it so freaking difficult?

Posted: Fri Apr 30, 2004 9:56 am
by CDiMa
alexkro wrote:
Krzysztof Duleba wrote:The OJ works on gcc 2.95.
Pardon for my harshness, but gcc 2.95 - it's just a shame! Valladolid is boasting of using the advanced OS and software (http://acm.uva.es/problemset/computer.html), and at the same time - gcc2.95 which is an ancient, ancient compiler. It just sucks, did you know that gcc3.4 existed? Install at least gcc3.2, is it so freaking difficult?
Please don't be rude!
There are many implications in changing the compiler in the online-judge which you may not be aware of, it surely isn't simply a matter of installing a compiler.
For a start you may consider the fact that newer versions of the compiler may increase significantly the load on the judge. Probably that's not what you want.

Ciao!!!

Claudio

Posted: Fri Apr 30, 2004 5:20 pm
by Krzysztof Duleba
Valladolid is boasting of using the advanced OS and software (http://acm.uva.es/problemset/computer.html)
Well, maybe that page wasn't simply updated for a long time. You know, few years ago gcc 2.95 was really, really advanced.
For a start you may consider the fact that newer versions of the compiler may increase significantly the load on the judge. Probably that's not what you want.
That's true. Due to low server performance OJ doesn't even use optimalization options as they increase compilation time significantly.

Another thing is that code compiled with different compilers may produce different output. Rejudging all the past submissions doesn't sound good.

Posted: Tue May 11, 2004 5:07 am
by GreenPenInc
I think the harshness is justified, to some degree. A better compiler would be much appreciated. I'm sick of getting everything working on my own computer just fine, only to have a TLE or RTE on the OJ where there's no reason for one. At least with a compile error it tells me what went wrong! There's just no reason I should have 20+ erroneous submissions for #209 when my logic is correct. (And I still don't have AC!)

Posted: Tue May 11, 2004 9:43 am
by Adrian Kuegel
There's just no reason I should have 20+ erroneous submissions for #209 when my logic is correct.
I think you won't find a compiler that will tell you that passing a char pointer that points to nowhere to getline is no good idea :wink:
And the old compiler has also some advantage: you don't have to write
using namespace std;
whereas gcc 3.2 requires this line whenever you use some STL library.

Posted: Tue May 11, 2004 12:04 pm
by CDiMa
GreenPenInc wrote:I think the harshness is justified, to some degree. A better compiler would be much appreciated. I'm sick of getting everything working on my own computer just fine, only to have a TLE or RTE on the OJ where there's no reason for one.
I'd say when you don't know the reason...

Ciao!!!

Claudio

Posted: Tue May 11, 2004 4:00 pm
by Krzysztof Duleba
Adrian, you're wrong.

g++ 2.95 allows you to skip writing the exact namespace of a function only if you use old-style headers like <iostream.h> (which are present in g++ 3.2 and 3.3 too). If you use <iostream>, you must add namespace name the same way as in newer versions of the compiler.

Posted: Tue May 11, 2004 6:47 pm
by Adrian Kuegel
So why does the following program compile without compile error?

#include <iostream>
#include <vector>

int main() {
vector<int> test;
cout << "Hello world" << endl;
return 0;
}

Posted: Tue May 11, 2004 9:57 pm
by Krzysztof Duleba
I tried the code you wrote and it compiled. I'm amazed. Thanks for info.