Programming Contest & PC2
Programming Contest & PC2
Original Slides by Brian Hare, James Cain, John Cigas PC2 DEMO by Ahmed Shamsul Arefin (PhD Student, CS/SE, UoN)
Main Features
Team programming
Typically 3 contestants per team 1 workstation per team
Problem set
For each problem:
Description, sample input/output For judges: Solution, Input file, Output file
Problem set
Boundary conditions specified for all problems
Judging input usually has at least 1 case that tests each boundary condition
Warn students if the obvious algorithm wont work (usually because of time limit)
No obligation to give them a hint about a better algorithm.
Range of difficulty
Goal is for all teams to be able to solve at least 1 problem, but no team solves all problems
Languages
Most contests restricted to C, C++, Java Difficulty should be roughly the same in each language
Some problems are fairly involved in C++ but theres a Java class that makes problem trivial Occasionally something in C++ STL causing same problem in other direction
Some problems that are fairly hard in system-level languages (C, C++, Java) are 5-liners in dynamic languages such as Python
So, hold Python contest separately from Java contest
5
Judging
ACM judging utility Program Contest Control (PC^2) program Manually
Copy source code to clean directory Build/Compile Copy input file to directory, run program Compare program output with judges output
Judging Feedback
For ACM, one of:
Submission error Run-time Error Time Limit Exceeded Wrong answer Presentation (format) error Success
Each incorrect submission (anything other than Success) adds 20-minute time penalty to score.
Hardware/software troubleshooting
Every site directors nightmare. What do you mean, the debuggers not there? If students are just unfamiliar with this IDE, thats their issue.
Hardware
Dont need screaming new hardware BUT all teams should be on substantially equal footing
5 year old commodity workstations are fine, provided that everyones on similar 5 year old commodity workstations, so no one has any particular advantage
Software
ACM requires MinGW port of gcc for C and C++
ACM coordinating multiple sites worldwide; strictly local contests may have different needs.
Some IDEs such as Eclipse support multiple languages, so only 1 IDE is needed Other compilers/languages should NOT be present on contest workstations
10
Whats allowed
Usually provide Java class documentation, C++ STL documentation from SGI Allowed to bring printouts, hardcopies, textbooks, etc at regional contests World Finals limit hardcopies to 25 pages
11
Infrastructure needed
Network connection if electronically submitting programs Printer for contestants (source code) Printer for judges (results, rankings)
13
Setting up workstations
Configuring software & testing configuration Setting up & testing judging software, PC^2
Preparing signage, running copies, ordering box lunches, etc Training/coordinating student volunteers Corresponding w/ other schools, contestants Reconfiguring our workstations
14
Resources
Google programming contest or programming challenge for many, many more, in many languages, at many levels.
15
16
17
Select a Problem
18
Select a Language
19
Submit
20
Confirmation
21
22
23
24
25
Send a clarification
26
View clarifications
27
Standing
28