CSC125, Spring 2006, Lab 11: Competitive programming
Today we will practice competitive programming in the style of the ACM International
Collegiate Programming Competition (ICPC). Georgetown College sends two programming
teams to the ICPC regional competition each fall on the first Saturday of November.
Go to http://acm.uva.es/problemset on the web and create a new account for yourself.
Write your User Id here: _______________
Spend the rest of the lab session today working on the 3n+1 problem which is stated here:
Submit your code to the online judge: http://acm.uva.es/problemset/submit.php . Submit your
program at least once even if it is not completely debugged. You will need your User ID from
registering in order to submit code. You will also need to enter the problem number which, for
the 3n+1 problem, is 100.
You will receive full credit for today’s lab session either by completing the program and having
it accepted by the online judge during the lab session or by staying for the entire session and
working diligently on the 3n+1 problem.
HINT: Often, one of the hardest things about these programming problems for the competition is
getting the input and output mechanisms just right. You must read the specifications of the input
that your code should handle and the output that it should give very carefully. The judges will
test your code for types of input that you might not foresee. And they will be very picky about
the formatting of your output. So this is sometimes as much an exercise in adhering to strict
specifications as it is in algorithm development.