Updated: Announcing Variable Time Limits Based on Programming Language

1 min read

Cupcakes,
You’ve asked for it, we’ve done it. A big complaint people have had was the time limits were too strict for programming languages that didn’t start with a C. There are now variable time limits depending on the programming language you have used to submit your solution. The current time limits are as follows (as a multiplier to the time limit listed on the problem page):

  • Java – 2X
  • Python (PYTH and PYTH 3.6) – 5X
  • JS- 2X
  • PyPy 2.6.0 – 2X
  • Kotlin – 2X
  • Ruby – 3X
  • PHP – 3X
  • Lisp clisp – 3X
  • Lisp sbcl – 3X
  • Scala – 2X
  • C# – 2X
  • SCM chicken – 3X
  • SCM guile – 3X
  • SCM qobi – 3X
  • All other languages – 1X

We will continue to tweak the exact multipliers  and will let you know if there are any other modifications.  Solutions will not be rejudged, you will be required to submit new solutions to see if your program now satisfies the time limit conditions.

Cheers,

The Chef

An overview of the eventful 10 day Coding Extravaganza,…

In Div 1 the 5-star romawhite from Ukraine finished as the leader in the rank list while in Div 2, the contest was fierce...
madhav122
2 min read

Connecting talent to opportunity through the CodeChef Certification

When professor Dr. Jayakrishnan needed an intern to join the NPTEL Data analytics team, he struggled to find the right candidate – one with...
teenage_witch
1 min read

2018 Recap: A look back on CodeChef’s adventures over…

CodeChef has completed 10 years of being India’s most popular competitive programming platform, but we’re only getting bigger and better with time! 2018 was...
admin
2 min read

40 Replies to “Updated: Announcing Variable Time Limits Based on Programming Language”

  1. What happens if tweaking the multipliers results in a submission failing with the new limits which passed with the old limits? Or will time limits only be increased?

  2. What happens if tweaking the multipliers results in a submission failing with the new limits which passed with the old limits? Or will time limits only be increased?

  3. You dont get it, because you do not understand the limitations of virtual machines and interpreted languages as opposed to compiled languages.
    Maybe wikipedia would help you.

  4. You dont get it, because you do not understand the limitations of virtual machines and interpreted languages as opposed to compiled languages.
    Maybe wikipedia would help you.

  5. The reason being that many of these languages are slower in one way or the other as compared to C/C++, so we feel that they should be compensated accordingly. Be rest assured that no one will get an artifical advantage because of using a particular language, and only good algorithms(in any language) will be able to pass successfully in the given limits. I hope that answers your concerns.

  6. The reason being that many of these languages are slower in one way or the other as compared to C/C++, so we feel that they should be compensated accordingly. Be rest assured that no one will get an artifical advantage because of using a particular language, and only good algorithms(in any language) will be able to pass successfully in the given limits. I hope that answers your concerns.

  7. @Anonymous Coward

    Most probably you haven’t used these languages. Else you wouldn’t have called it an “advantage” in the first place. Try running a code with same logic in C and Java and notice the difference in times.

  8. @Anonymous Coward

    Most probably you haven’t used these languages. Else you wouldn’t have called it an “advantage” in the first place. Try running a code with same logic in C and Java and notice the difference in times.

  9. @Anonymous Coward- It appears you are new to programming, cause the question you asked is answered in 8th or 9th grade(at least in ISC I guess). Its great you’re coming on to a site like Codechef for a better exposure! I’d suggest you go and check the best times for one of the trivial problems like Life, Universe, Everything and note the difference in timings.

    Apart from the VM etc. I guess Java’s unicode character set which gives a further burden to the programs….

  10. @Anonymous Coward- It appears you are new to programming, cause the question you asked is answered in 8th or 9th grade(at least in ISC I guess). Its great you’re coming on to a site like Codechef for a better exposure! I’d suggest you go and check the best times for one of the trivial problems like Life, Universe, Everything and note the difference in timings.

    Apart from the VM etc. I guess Java’s unicode character set which gives a further burden to the programs….

  11. Hi, What is the multiplier for C#? The same logic also applies for keeping a higher multiplier for C# as well, since C# code is complied Just In Time.

    Thanks,
    Abhijeet.

  12. Hi, What is the multiplier for C#? The same logic also applies for keeping a higher multiplier for C# as well, since C# code is complied Just In Time.

    Thanks,
    Abhijeet.

  13. #include <iostream>#include <cstdio>int main(void) {unsigned int count=0,i=0;long unsigned int k,n;unsigned int temp;fscanf(stdin,”%uld”,&n);fscanf(stdin,”%uld”,&k);if(k<=10000000){ while(i<n && std::cin>>temp && temp<=1000000000){ if(temp%k==0)count++; i++; } }std::cout<<count; return 0;}WHY TIME LIMIT IS EXCEEDING…………what's wrong with this

  14. #include <iostream>
    #include <cstdio>
    int main(void) {
    unsigned int count=0,i=0;
    long unsigned int k,n;
    unsigned int temp;
    fscanf(stdin,”%uld”,&n);
    fscanf(stdin,”%uld”,&k);
    if(k<=10000000){
    while(i<n && std::cin>>temp && temp<=1000000000){
    if(temp%k==0)count++;
    i++;
    }
    }
    std::cout<<count;
    return 0;
    }

    WHY TIME LIMIT IS EXCEEDING…………what's wrong with this

  15. #include
    #include
    int main(void) {
    unsigned int count=0,i=0;
    long unsigned int k,n;
    unsigned int temp;
    fscanf(stdin,”%uld”,&n);
    fscanf(stdin,”%uld”,&k);
    if(k<=10000000){ while(i>temp && temp<=1000000000){ if(temp%k==0)count++; i++; } } std::cout<

  16. Can we have Scala timing at par with Java. it is quiet an overlook to have different times for both if they are using the same JVM the execute the bytecode.

  17. For java you can use java.util.concurrent package which provide TimeUnit enum. Using this enum you can set max execution time for a method and validate execution time.
    PHP also provides a function set_time_limit(). using this function you can dynamically set time limit for a function.
    By these way we can set max execution time for a program.
    I think all programming lagueses have this type of feature.

Leave a Reply