You are on page 1of 3

Amdocs India Innovation

Code Mania Rules


Amdocs India Innovation Board proudly presents Code Mania, the coding competition encompassing
Java, C and C++ languages.

• The problem statement would be published via email as well as uploaded on the Code Mania portal
• You will have 5 days to provide your solution from the time the problem is published
• You are free to use C, C++ or Java language to solve the problem
• As soon as the problem is solved and tested by you, submit your source code in zipped format on
the Code Mania portal. Do not zip the entire folder. Your zip file should only contain files and not
folders or sub-directories
• As soon as your submission is successful, compile and execute your latest submission by using the
“Compile” & “Execute” buttons on the “My Submissions” page. Only a successful compilation will
enable you to execute the code. The compile button would enable you to compile your code in our
evaluation environment. The execute button would enable your compiled code to be run with our
set of test cases (the test cases would be revealed to you only after announcing the results of the
competition)
• You should only use the standard libraries for each language and desist from using 3rd party library
functions in your solution
• Your solution will be validated by our “Automated Solution Validator” (aka ASV) to determine if
your solution complies to the requirements
• You solution needs to follow the rules laid down by the ASV
• Your aim should be to write a standalone program that can be executed in the command line
• It is mandatory for you to successfully compile & execute your code in order to be eligible to win
the competition. All those entries of participants who have not done this step would not be
considered for final evaluation
• Once you have a status of “Compilation Succeeded” and “Execution Succeeded” on the “My
Submissions” page, do NOT try to compile and execute the same code again because it would
update the timestamp of your submission. Remember that judges would consider you latest (and
not your earliest) executed solution to declare the winners

Rules for C language submissions:


• Solution should be restricted to a single “.c” file (naming convention “<programFileName>_<emp-
id>.<language-extension>”. e.g., fallingBricks_12977.c)
• ASV uses the cc compiler on Solaris (Sun OS 5.10 Generic_127127-11 sparc SUNW,Sun-Fire-V490) for
evaluating your solution. So please test (compile and execute) your code on a Solaris environment
before submitting to avoid compilation / runtime errors during evaluation

Rules for C++ language submissions:


• Solution should be restricted to a single “.cpp” file (naming convention
“<programFileName>_<emp-id>.<language-extension>”. e.g., fallingBricks_12977.cpp)
• Solution should have only one class in it
• You may use STL specific functions as supported by GNU-provided GCC/G++ compilers (e.g., usage
of #include <algorithm> should include “using namespace std;”)
• ASV uses the CC compiler on Solaris (Sun OS 5.10 Generic_127127-11 sparc SUNW,Sun-Fire-V490) for
evaluating your solution. So please test (compile and execute) your code on a Solaris environment
before submitting to avoid compilation / runtime errors during evaluation
Rules for Java language submissions:
• Solution should be provided in Java 1.4 or higher
• No restriction of single file or single class (note: one of the “.java” files should have a main
method) [naming convention “<programFileName>_<emp-id>.<language-extension>”. e.g.,
fallingBricks_12977.java]
• If you are submitting a solution in java which has multiple files, all the files should follow the
naming convention of “<fileName>_<emp-id>.java”
• Desist from ungraceful exit from your code like using system.exit() as this may result in your code
being disqualified for evaluation

Common Rules for all languages:


• Input to your program would have to be read from a file and output from your program should be
written into a file (there would be no inputs / outputs to console)
• Your program should accept 2 parameters (as runtime command-line arguments), both file names.
The first argument would be the input file name and second argument would be the output file
name
• Note that only filename will be accepted (you are not supposed to give path information). Also
note that the ASV tests your program from the command line. Your program should look for the
specified input file and output file from the location where your program exists (current working
directory) and not from the default working directory that is set in your IDE (e.g., Eclipse’s
workspace)
• The input file can have multiple test cases one after the other & your program should handle that
• The output file should have the output as specified in the rules you would get along with the
problem statement (no additional whitespaces should be used)
• The first three correct solutions would be awarded “Winner”, “First Runner-up” and “Second
Runner-up” respectively
• Apart from the winners, all correct solutions would get a mention in the results email as well as on
the Code Mania portal

How to submit your code:


• You need to logon to the new Code Mania portal to submit your code
• You need to zip your code using WinZip in order to submit
• In case of a Java solution which has multiple files, zip the files and not the folder containing the
files (no directories or subdirectories allowed). This means, all your files must be in the root of
your zip file. If your zip file has directories or subdirectories within it, you will not be able to
submit the solution
• On the portal, click on “Submit Solution” button, click “Browse…” to select your zip file and click
“Upload File” button to submit your code. View all your submissions in “My Submissions” page
• After successful upload of your file(s), click on “Compile” button in the “My Submissions” page to
compile your code in our test environment. If you code compiles successfully in our environment,
you will receive a “Compilation Succeeded” notification on the “My Submissions” page. If there are
compilation errors, the same would be displayed to you and the status of your submission would be
marked as “Compilation Failed”
• Multiple submissions are allowed. The latest one received during the period of competition would
be the one that ASV would compile & execute when you click the appropriate buttons
• Once compile step is successful, you need to click the “Execute” button in the “My Submissions”
page to execute your code in our test environment against our test inputs. If your code executes
successfully against our test cases, you will receive a “Execution Succeeded” notification on the
“My Submissions” page. If the execution fails (for reasons like your output not matching our output,
time-out in case output does not get produced in 60 seconds, run time exceptions etc.), you will
get the notification of the same with the appropriate error and the status of your submission would
be marked as “Execution Failed”
• Judges would consider your latest “Compilation Succeeded” and “Execution Succeeded” entry
while deciding the winners of the contest

You might also like