Codechef has recently updated the compiler versions. A very good news but I noticed that in case of comparatively old problems ( problems dated before the update ), the features introduced by the latest compilers are not working resulting in compile time or run-time errors.
So to test this issue ( to be sure the errors are not due to my silly mistakes ) I experimented on the good old TEST problem for java.
Experiment 1 : I checked the version of java busing
System.getProperty("java.version"); and if it is not java 8 ( 1.8.0_25 as reported by the new codechef IDE ) then throw exception(s).
Experiment 2 : Use any new library or method introduced by Java 8 to check if it shows any compile time error message(s).
Conclusion 1 : The runtime NZEC occured ( as expected ) which indicates that
System.getProperty("java.version"); returned some version number other than java 1.8 which means Java 8 is not used for this problem.
Conclusion 2 : Compile time error orrurred (as expected ) because the new library was not present which means Java 8 is not used.
Here are my test programs NZEC and Compile error.
So my question is that will the compilers be updated for such problems or we should code according to the older version??
Note : This situation does not occur in case of very new problems (dated after the compiler update ), tested SEAND2 in similar manner and it worked.
My observation is more “strict” (at least with previous compiler update). It’s about in which version the problem was created, it happened also in December 2014 long contest, that problem Chef Under Pressure used Java 6 instead of Java 7… Such change gives me compilation error on first try…
How to know in which version a problem is created ??
In the Languages allowed section of a problem it is mentioned with version information like CPP 4.3.2, CPP 4.9.2, CPP14 , but no such version info for JAVA,
As far as I now you cannot, Java 6 can be detected later, when amount of memory is 170MB, while on new server it is almost ~1400MB.
Now a realized older discussion - http://discuss.codechef.com/questions/28167/java-compilation-problem so it may be also possible that on one server Java was updated from 7 to 8, while some old problems run with java 6 and those won’t be updated…
I had sent an e-mail to Codechef regarding this issue. They replied,
" The problem that you tried your solution on is using the old pyramid cluster which uses old versions of JAVA (you can read more about it on http://discuss.codechef.com/questions/25962/maximum-memory-limit-for-a-submission). Try your solution on new problems. We tried some codes using your strategy for the the problem ANUTHM.
Here are the submissions
(Exp2 :http://www.codechef.com/viewsolution/5968373) "
So my understanding from this is that the Compilers are updated for the Cube cluster, i.e., new problems with larger (1536 MB) memory limit and running on Cube Cluster has received the upgrade but sadly the older problems running on pyramid cluster are not upgraded ( yet ).
Very useful information, especially for those who would try their skills on the relatively older problems and wonder what went wrong :-D.
Thanks Codechef for clearing this.