The goal of this course is give students the opportunity to test their programming skills on tricky challenges, games and puzzles by means of programming competitions.




Office hours:

David BecerraTuesday 11am-1pmENGTR 3110

Course Webpage:

Course Material:
There is no required material; however, I recommend the following material:



Course Format:
The course consists of 4 2-hour lectures, and 5 3-hour lab meeting / programming contests. In addition to the 23 hours of in-class work, the students will be given training problems to exercise their skills at home, which brings the total amount of work for the course to approximately 45 hours. The course material will be covered before the second week of November, to accommodate for students that might be interested to participate in the ACM competitions.

Your final grade will be calculated as follows:

The contests will consist of 5-10 problems of varyingly difficulty to be solved in three hours. The first contest is individual and the remaining two are taken in teams of three students. The team that solves the most problems in the fewest attempts in the least cumulative time will be declared the winner.


Release DateDue DateAnnounce
Sep 9Welcome to COMP321!


Lecture 1Sep 9Presentation of the courseLecture 1
Lecture 2Sep 16T1 : Data Structures + Sorting + StringLecture 2
Lecture 3Sep 23T2 : Recursion + Dynamic ProgrammingLecture 3
Contest 1Sep 24, 9am-12pm in ENGTR 3120First Contest (T1)Contest 1
Lecture 4Sep 30T3: Graph Algorithms + GeometryLecture 4
Contest 2Oct 1, 9am-12pm in ENGTR 3120Second Contest (T1 + T2)Contest 2
Lecture 5Oct 7T4: Algebra + Combinatorics + Number Theory Lecture 5
Contest 3Oct 8, 9am-12pm in ENGTR 3120Third Contest (T1 + T2 + T3 + T4)Contest 3
No classOct 14No classNo class
Local ContestOct 15Local Contest - 3 McGill TeamsLocal ICPC Contest
Contest 4Oct 21, 9am-12pm in ENGTR 3120Fourth Contest (T1 + T2 + T3 + T4)Contest 4
Contest 4Oct 28, 9am-12pm in ENGTR 3120Fourth Contest (T1 + T2 + T3 + T4)Contest 5
No classNov 4No classNo class
Regional ContestNov 12Regional Contest - 1 McGill TeamRegional ICPC Contest



Policy on discussion
We are in this course to learn. We are all a team. Then, we must respect the ideas, questions and opinions of our mates. All the ideas about how to solve a problem are valuable and welcome.

Policy on collaborations
I greatly encourage you to discuss the assignment and contest problems with each other in your team. You are also encouraged to discuss with other teams members (but not during the last three contests). However, these discussions should not so far that you are sharing code or giving away the answer. A rule of thumb is that your discussions should be considered public in the sense that anything you share with a friend should be sharable with any student in the class. It is highly possible that you will find solutions to the contests on-line. Please do not copy the answers. You are registered in this course to train your problem solving skills and copying code from others does not help you in this goal. If you will copy/paste code, you should atleast understand the code that you are copying.

Policy on re-grading
The grading will be given by the online judges. Judging is relentlessly strict and the grading will be based on the online judge acceptance criteria. There is no re-grading for this course.

Policy on final grades
I will use the same rules and formula for calculating the final grade for everyone. I understand that your performances may be influenced by many factors, possibly out of your control. However, that is the only way we can be fair. One exception will be medical exceptions. In that case, I will require a medical note, which has to be also reported to McGill, and to be informed as early as possible. Failure to comply to these rules, may results in the impossibility to invoke a medical exception.

Policy on Assignments
Due date/time, location/mode for returning your solutions, and accepted formats will be announced in class and indicated on the course web page.
Failure to return your assignment in time will results in penalties or even absence of grading. Late submission of 24h or less will receive a penalty of 25%. In all other cases, your assignment will be refused and not graded.

Use of French in assignments and contest
In accordance with McGill University’s Charter of Students’ Rights, students in this course have the right to submit in English or in French any written work that is to be graded. Based on the rules of the ICPC, the language of the Contest is English and all written contest materials will be in English.

McGill policies
McGill University values academic integrity. Therefore, all students must understand the meaning and consequences of cheating, plagiarism and other academic offenses under the Code of Student Conduct and Disciplinary Procedures. See this link for more information.


If you have any additional question, you can contact the instructor:

David Becerra
3630 University Street, Room 3150, Montreal QC H3A 0C6

Based on a template from