Fall 2001 University of Colorado Local ACM Contest General Rules and Guidelines 1. Problems ----------- Each problem consists of reading some input, processing it, and providing some output; problem solutions will not be interactive or "online". Problems are "correct" if they pass all our test cases within the allotted time. All problems have an implicit time constraint; we won't wait an hour (or even 5 minutes) for your program to finish. In addi- tion some problems have an explicit time constraint (either written on the whiteboards or specified with the problem). All problems have been solved by the judges and run in seconds. 2. Scoring ---------- Final standings are based on the number of correct solutions submitted by the end of the contest. If there is a tie, for example, several students solve 3 problems each, then the tie is broken by time to solu- tion. Each successful solution scores 1 point per minute from the beginning of the contest to the time of solution, plus 20 points for each incorrect solution to that problem that was submitted. Lowest total score wins. If you don't eventually solve a problem, you won't be charged points for any incorrect solutions you may have submitted. 3. Submitting ------------- You will submit only your source-code - a single file for each problem. The filenames are as follows: hackfix.c(pp) - for "Hack-Attack" mtime.c(pp) - for "Those Crazy Brits" firecodes.c(pp) - for "Conforming to Code" Source code may be in C or C++. The file must have the correct extension '.c' or '.cpp' respectively. NOTE: We strongly suggest that you identify your team # in a comment at the beginning of every file. We will be tracking which team each submission comes from, but we are not perfect. To submit a problem, type in the following: ~judge1/acmsubmit [your_source_code_file_name] 3. Ethics You are allowed to bring and use any printed material including books, notes, printouts of programs, etc. You may not use a calculator. You may not use anything electronic, from the network, from a floppy, from another computer, from a disk file that you stashed on the machines before the contest, etc. At regionals and nationals access to electronic stuff is just not there; here you are on your honor. This is an individual contest; all work must be your own -- don't copy from your neighbor or ask him/her for help. Copying from the books and printed stuff that you bring or borrow is fine. 4. Hints Read all the questions before you start solving any of them; we may have stashed all the easy ones at the end. Tackle the easy ones first; because of the scoring algorithm, solving easy ones fast and first gives you an advantage. Before you submit and after you think you are done, reread the question carefully and be sure you solved the right problem, named the files correctly, formatted the output correctly, etc. Test the boundary conditions. If n can go from 0 to 10000, we will probably try 0 and 10000 and lots in between but also might try -1 and 20000 too. Actually, we shouldn't, if the problem says a parameter has a certain range we won't test out of that range (I would in my classes, but not here). Don't get stuck on one problem for too long; if you feel you aren't making progress, try another one. One year when our team at nationals was 4 students, two of them spent the entire 5 hours on one problem. They kept saying they were soooooo close, just one more try. They never got it. -------------------- Printing -------- You are allowed to print stuff out during the contest. ATTENTION: For each printout it is IMPERATIVE that you identify your TEAM # on the first line so we know who to give the print-out to (you will not have direct access to the printer). You may print any text-file by typing: lpr -Pakira [your_file_name] I/O --- Each program will get its input from stdin and output to stdout. Hence there will be exactly one (1) input and one (1) output "file". Input ----- The first line of every problem's input file will contain exactly one number indicating how many trials are in the file. The number of trials will be greater than 0 and less than 100. Output ------ The output file for each program will contain a set of sequential outputs, one for each input trial. There will be exactly one line-feed between trials (no blank lines; no double line-feeds). Each trial will be identified by an integer in the manner stated in each problem description. That integer will start at 1 and count up by one for each trial. Testing Methodology ------------------- Your output will be compared, case-sensitively, byte-for-byte, with our output. Any discrepancy will constitute an error except for the following: Trailing white-space on each line will be ignored Trailing white-space at the end of the file will be ignored NOTE: In regionals and internationals, trailing white-space discrepancies WILL CONSTITUTE AN ERROR. "Be careful, young Skywalker. The Emperor is not as forgiving as I." Furthermore, your program must run in a timely fashion. If it takes more than a few seconds to run, the judges will give you a time-out failure.