A question about the SPOJ/Codechef online judge

Hi all,

I have noticed that at Codechef, Time Limit Multipliers for non-imperative languages are set to 1 by default, i.e. if we define TL to be 1 sec, then the solutions coded in Haskell/Scala/Clojure, etc, should also take 1 sec. (1x 1sec per testfile)

I believe that this feature is problem dependent and when I am setting a problem I might be able to “override” those TL multipliers for those specific languages. I am just wondering if this is really possible to do?

I am asking this because at websites like Hackerrank where functional programming contests are held, those time limits are of:

16 seconds per testcase for Scala and of 8 seconds per testcase for Haskell for example.

Can we tweak those limits when we set problems?

Best,

Bruno

1 Like

Hey kuruma,
Yes, we can do two things here :

  1. Set the time limit for a testcase file (say ‘T’)
  2. Set a multiplier for some particular language (say ‘M’)

So you can run the desired solution on testcases with a T=1, M=25. After getting the actual execution time for your desired code, you will get an idea about what multiplier you should set for that particular problem.

I did that for one of my problems last week, in NCC2014. I had to set a 18x multiplier for Python. I wasnt surprised I had to do that, because Python is indeed 10 to 20 times slower than C/C++.

2 Likes
//