University of Maryland High School Programming Contest Rules and Information ---------------- Contest Specifics ---------------- 1.Each team will use ONE computer --- other computers in the labs must stay powered down. No computer equipment may be brought into the contest area, except for one USB mouse per team. 2.Teams are allowed to bring a reasonable number of computer books and/or notebooks into the contest area for use during the contest. Teams are NOT ALLOWED to bring a disk, software, or machine-readable software into the contest area. 3.Teams will not have their own printer. A network printer will be accessible. 4.No food or drink in the labs. There will be lunch before the contest, and refreshments supplied afterwords. 5.Any questions to the judges should be submitted online using the Contest Forum software. All questions are submitted in private. Each question will be acknowledged, although the judges may refuse to answer any question. The question and its answer may be provided to all contestants if it seems relevant. 6.The only discussion permitted is within a team and with the contest staff. Teams are not allowed to use telephones, cell phones, pagers, or other wireless devices to contact or talk to anyone else during the contest. 7.Teams are allowed to use calculators (hand-held or the built-in Windows calculator). Teams are not allowed to use non-contest software on their computers. Teams are not allowed to use web browsers, telnet, ssh, ftp, or other networking software to obtain help on their contest problems. 8.You may work on the problems in any order, and submit them in any order. 9.Your programs must not do any file input or output. All contest input will come from stdin -- that is, the keyboard, and all output must go to stdout -- that is, to the console. 10.You need consider the efficiency of your algorithms to make sure it will take less than 1 minute of running time. For some of the problems there exist solutions that might work, but are so inefficient that they will not finish in the allowed time. 11.To receive credit for a problem solution, you must turn it in for judging, using the command described below. The response will be one of the following: Correct Incorrect Output Incorrect Output Format Incomplete Output Failed Test Case Compiler Error Run-time Error Run Time Limit Exceeded (2 minutes on the judges machines -- this should not be an issue unless you've coded an inefficient solution) 12.After submitting a judged run, you may resubmit the same problem before getting a reply from the judges, but this will invalidate the previous submission, which will then be counted as an incorrect submission. 13.The judges' decision is FINAL. ---------------- Scoring ---------------- The team that has had the most problems judged correct at the end of the contest will be declared the winner. If more than one team has solved the same number of problems, the winner is the one with the fewest penalty points. Penalty points are assessed for solved problems only. Each problem accumulates one penalty point for each minute from the beginning of the contest until the time of a correct submission. Twenty penalty points are assessed for each incorrect submission. The contest director reserves the right to adjust penalty points to allow for unforeseen circumstances. ---------------- Web Interface ---------------- You will be using a web-based interface to submit your problem solutions, check solution status and scores. To access the interface, bring up your web browser. home The ``home" button should bring you to the UMCP programming contest web interface. contestant You need to click on the appropriate link to log in as a contestant. Your team name and password will be supplied as part of your documentation. submit To submit a solution, you will now need to first create a "jar" archive (e.g., prob1.jar) file containing all your Java source files. You can do this manually using jar or through the mjar script in /contest/bin. After creating the jar file, click on the ``Submit'' hyperlink in the top left corner of the interface. Now select the problem number from the ``Submit Problem:" box. Then enter the name of your Java jar file (prob#.jar) in the ``Program Jar File" box. You may also hit the ``Browse" button to find your jar file. When you are ready, click on the ``Submit Program" button. It then sends your file over the network to the judges. status To get status of your submissions, click on the ``Status'' hyperlink in the top left corner of the interface. This program will show the status of all problems you've submitted to the judges. But please be patient! You may use the ``Reload" button to update the results. Responses to your submissions may contain comments. You can see judges comments by clicking on the ``Message Waiting!" hyperlink scores To see the current scores of all the teams, click on the ``Scores'' hyperlink in the top left corner of the interface. This will show the current scores of all the teams. The ScoreBoard will be updated every few minutes. The scores hyperlink will be disabled during the last 45 minutes of the contest. forum To submit questions to the judges (or see public questions and answers), click on the Contest Forum link from the contest server. ------------------------ Contest Commands & Files ------------------------ /contest/bin A number of contest scripts & executables /contest/bin/try A script to test your submissions usage "try " /contest/bin/mjar A script to make a JAR file from your .java files usage "mjar " ------ ~/contest All local contest files ~/contest/code Java code for problems ~/contest/code/prob1 Java code for problem 1 ... 8 ... ~/contest/code/prob8 ~/contest/code/prob*/*.java Skeleton solution code ------ ~/contest/problems Test data for problems ~/contest/problems/1 Test data for problem 1 ... 8 ... ~/contest/problems/ ~/contest/problems/*/*.in Sample test input data ~/contest/problems/*/*.out Correct test output data try The "try" script will test your code against some sample inputs. Try takes the problem number as its parameter. It then compiles all .java files in the current directory and runs "java Problem" on the test data that was given with the problem. This lets you try your program before submitting it for judging. Example usage: "try 1" while in ~/contest/code/prob1 The try command will 1) compile all the local Java source code (*.java), 2) execute it against test data in ~/contest/problems/*, 3) put the output in *.log files, 4) compare the output with correct input using "diff", and 5) report on results. Remember the test data we supply using 'try' is a subset of the actual test data we will use to judge the problem (i.e. just because a program passes try doesn't mean it will be judged correct when submitted). mjar The "mjar" script will create an archive of all your Java codes in the current directory to be submitted. Mjar takes the problem number as its parameter. Programs written in Java may require multiple files (one per class). In order to produce a single file for submission, we use the "jar" utility to create a single archive for all the .java files in the solution. "mjar" is a perl script which essentially runs "jar cf prob#.jar *.java" in the current directory, producing prob#.jar, where # is the problem number. This is the file that should be submitted via web upload. Example usage: "mjar 1" while in ~/contest/code/prob1 The mjar command will 1) put all local Java source code (*.java) in a jar file 2) the jar file will be called prob#.jar, where # is the parameter given to mjar 3) you can submit this jar file using your web browser cleaunup A simple script to delete .log, .diff, .out, .exe, .obj and .class files in your current directory. javac The java compiler. Compile files using "javac *.java" to produce .class files. java The java interpreter. Run java programs by typing "java ". The .class files must be in the local directory or listed in the CLASSPATH environmental variable. ------------------------ Eclipse ------------------------ The Eclipse Java development environment is provided in /Applications/eclipse. If your team wishes to use it, make a copy of the /contest/code directories into the Eclipse workspace directory, then import the files into Eclipse as new projects.