Codevita Faqs, General Instructions and Best Practices
Codevita Faqs, General Instructions and Best Practices
Q1. I’m getting the message “User already logged in. Please try after 15 minutes”. What do I
do?
A1. Please use the logout button to close your active session. In case you close your session
without logging out properly or accidentally, you will be able to login again only after 15
minutes after your current session closure. If you are still unable to access the page, then
please check your network strength. You may refresh the cache memory in your browser
settings as well before logging in again.
A2. First you will have to check if you are eligible for TCS CodeVita Season 9. Many students
have not completed their registration process successfully. If you are eligible, then you can view
the below message “Contest Registration Done” on your CodeVita Season 9 contest page as
shown in the image below.
Post this check, you have to log in to www.tcscodevita.com. Username will be your registered
email id and password will be the unique “secret code” that is available on the Campus
Commune portal. Also, we have sent your secret code on your registered email id. Keep
password of Campus Commune handy before the contest as well. Secret code contains only 7
characters. The secret code is space and case sensitive. If you are pasting the password, please
check that there are no extra spaces. There is no need to update your secret code. Same secret
code will work for all CodeVita Rounds.
Please find the path below to find your secret code to login:
Campus commune Home -> Click on Contests> CodeVita Banner -> CodeVita contest page ->
View CodeVita Credentials (at the right side).
A3. Please remember that there is no need to reset password for accessing the CodeVita
Contest. Your password will be the same secret code that is unique to your registered ID and
that is displayed on your Campus Commune – CodeVita Channel home page. Your username
will be your registered email ID.
Please find the path below to find your secret code to login:
Campus commune Home -> Click on Contests> CodeVita Banner -> CodeVita contest page ->
View CodeVita Credentials (at the right side).
Post getting the secret code, please log in to www.tcscodevita.com
(http://www.tcscodevita.com) with your mail id and secret code generated in Campus
Commune.
Request you to use a Desktop/Laptop for participating in the contest. Please note that the
secret code is case sensitive. Please do not leave any spaces in between the characters.
If the student has written the entire code from scratch the ‘Attribution of code’ does not apply.
A7. Providing the entire link/ URL of the source code is proper attribution of Code. Through the
link/URL we can access/view the source code.
Generic entries like ‘Google.com’ ‘www.codechef.com’, ‘stackoverflow’, ‘stackoverflow.com’,
‘Friend’s Code’, ‘Internet’ and other incomplete entries will not be accepted.
Q8. “What happens if I do not attribute the code I have referred to?”
A8. Your submission will be considered as Plagiarized and you will not be considered for next
round of the contest
Q9. “I am getting errors like ‘program doesn't exist’, '404 error’ and sometimes my submit
button is not visible.”
A9. Before logging in, request you to kindly delete cached files by pressing Ctrl + Shift + Del,
then ensure the checkbox for 'Cached Images and Files' is checked, and then click on 'Clear
Data'. Ignoring this step might cause the erroneously cached files to misbehave on the site.
Q10. “Can I take personal breaks in between the contest?”
A10. Start the contest only once you are ready because once clicked, the timer will continue for
the next 6 hours irrespective of personal breaks. You have to manage your time accordingly. For
breaks, please logout of the system by pressing on the logout button or else there will be a
waiting period of 15 mins to log in again.
Q11. “When I click on compile and run, its showing ‘Problem does not exists’ Or “I am not
able to view the ‘Upload solution’ button while submitting my code” Or “I get an error
message that site cannot be reached”
A11. Please crosscheck this troubleshooting checklist:
-Ensure you are using a wired/reliable network. Mobile network usage is not recommended, as
there can be network fluctuations.
-Compatible browsers are Chrome and Firefox.
-Browser being used should be updated to the latest versions.
-Ensure that Javascript is enabled on your browser.
-Ensure that any org / institute/system level proxy is not blocking any content of Codevita site.
- Suggest you to clear the browser cache and downloaded files, then try again.
If you use 'Online Editor' option and while trying to submit the code you find the 'Problem
Does not Exist' error, please "logout" of the current session, close any online editor tabs and
then try to login again.
A successful compilation simply returns silently. Hence your aim should be that your program is
so agreeable with the compiler that the compiler happily returns silently.
Systemic Faults: Systemic Faults can give rise to RTE if the Judge is not properly configured to
evaluate submissions. In most cases the configurations are on a per-language basis. However
systemic faults exhibit binary behavior i.e. either it will work for all submissions in a given
language or it may work for none of the submissions in that given language. It cannot be that
some programs in a given language receive RTE and some don’t. If this happens to be the case
then it is almost always Submitted Program Fault.
It is also possible that one language is configured properly, but some other isn’t. Let’s say that C
is properly configured and Java is not properly configured. In this case all the C submissions will
be devoid of Systemic Faults whereas all the Java programs will be susceptible to Systemic
Faults. Faults in configuration of one language does not have an impact on behavior of other
language. It is the duty and task of Code Vita Engineering team that systemic faults are
eliminated before the Judge is thrown open to Code Vita participants. Unlike CTE, RTE is not a
transient fault and does not change behavior even under load.
Submitted Program Faults: In 99.99% of cases, RTE is caused by Submitted Program Faults. Very
rarely, and I don’t recollect any instance in past 4 seasons of Code Vita that a Systemic Fault
causing RTE has ever been exposed in Live Rounds. Submitted Program Faults could be caused
because of any reasons, but not limited to those stated below.
Failure to adhere to input and output specifications is the number one cause of RTE.
Known programming violations like Illegal memory access or Null Pointer Exception etc.
result in RTE
RTE are more common to languages like C and C++ where static time type checking is
lenient and hence faults manifest only at runtime.
Any logical mistake that leads to throwing an exception receives an RTE
If you have participated in previous seasons of Code Vita, request you share your stories on
how you got past RTEs.
3. Time Limit Exceeded (TLE):
In automated code evaluation environments optimal utilization of shared resources such as
CPU and memory are key to delivering good performance. However no matter how well a
platform is engineered, performance can deteriorate if submitted code is a CPU or Memory
hog. So one poorly written program can affect the evaluation times of several others. In such
situations platforms, including Code Vita have no choice but to abort the rogue program. The
threshold when this behavior kicks in, in Code Vita, is different for different questions.
For example, if a problem is purely compute-intensive i.e. has CPU-affinity then the programs
may have a smaller threshold, say 1 second. Likewise, if a program requires lot of memory
accesses to be performed, it may have slightly higher threshold, say 2 seconds. In Code Vita,
these limits will be implicit. What this means is that it will not be explicitly spelled out what is
the Time Limit for each question. However, an intelligent reader will have already figured out
that the moment this status message is received, one has to minimize the runtime of the
program.
To cite a contextual example, let’s say a question in Code Vita requires you to sort millions of
elements. If you implement a naive algorithm like Bubble Sort whose Order complexity is
O(n^2) you are almost certain to receive a TLE. A solution to get past TLE, would be to
implement a better sorting algorithm, say Quick Sort whose Order complexity is O(n log n). This
will drastically reduce the sorting time and the program can finish within thresholds.
Now that we have seen what a TLE is and why it occurs and how system responds to it, let’s see
some of the ways in which you can overcome TLE
It is a good practice to insert timestamps in your code to know how much time is spent
in different parts of your code. So in case you get a TLE, you already know where your
bottlenecks are.
Your choice of data structure and algorithm plays a critical role in assessing whether you
will or will not receive a TLE
Keep a profiler handy and more importantly know how to use it so that in case of TLE
you may get insights on runtime of your code.
With TLE, some good programmers have a reverse gripe i.e. they write so optimized
code that they feel that the thresholds are too lenient. Such programmers are advised
to have patience. May be with a few questions, few programmers can get away even
with sub-optimal code but it cannot happen always. Keep up the good habit of writing
optimized code. There will come a question where only optimal code will pass and rest
will receive TLE. It’s just that, not all questions are geared towards figuring out if the
participant can write optimal code. Also, finally if all others things are equal, and two
teams are tied for the last spot, then Code Efficiency which is one of the governing
parameter, will kick in and the more efficient code will win. So please don't be too hung
up if you have written a (n^2) complexity algorithm and your friend's (n^3)
implementation also passes the evaluation.
So all the best to you all and let there be no more TLEs. Sophisticated programmers use many
brilliant techniques, like commenting certain sections of the code and figure out the
bottlenecks if a TLE status gets converted into Wrong Answer status.
4. Memory Limit Exceeded (MLE):
Just like TLE appears due to longer than allowed runtime execution times, MLE occurs due to
higher than permissible memory utilization. More memory utilization is a function of two things
- the language of your choice and how you handle memory allocation / deallocation in your
code.
Memory footprint of languages: Standalone languages like C and C++ have better memory
footprint than managed runtime languages like Java and C#. Interpreted languages like Perl,
Python, Ruby etc. are somewhere in between. Code Vita systems are 64-bit and we calibrate
the footprint of languages before setting memory limits on them. It can be safely said for the
kind of problems that are asked in Code Vita, the memory footprint of language runtimes far
exceed the amount of memory that a program may possibly need to use to arrive at the correct
solution. Hence MLE status is almost always due to poor memory management strategy
implemented in the program.
Memory Management in own code: Statically allocating large chunks of memory or
speculatively allocating memory based on own understanding of questions is usually the main
reason for MLE. Other than that poor data structures and algorithms also cause more than
permissible usage of memory. In Code Vita, memory footprint of every process is tracked and
rogue processes using more memory are terminated and a status of MLE is returned to the
submitter of that program. There are no general rules on how to reduce memory utilization.
The rules are language and context dependent. So ensure that you are aware of how to
techniques to reduce memory utilization in language of your choice.
5. Wrong Answer:
Wrong Answer is caused because your program didn't give the same output as expected for 1
or more test cases.
Whatever questions are being asked in Code Vita goes through thorough testing. So even if
your program executes successfully on your system, which does not indicate its correctness. It
should pass through all the private test cases of our problem. So before raising any queries,
verify your program thoroughly.
6. Accepted:
Accepted status comes when your program have passed all the test cases i.e it provided the
same output as expected.
If your program shows this status, your problem is solved and you should move on to next
problem.
7. Presentation Error:
Presentation Error status comes when your program output differs from the expected output
by a whitespace character.
Even If your program shows this status, your problem is considered as solved. So don't try to
get it in Accepted status and move on to next problem.