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 nine 1-hour lectures, and four 3-hour lab meeting / programming contests. In addition to the 21 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 42 hours. The course material will be covered before the week of exams on December.

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 8Welcome to COMP321!
Sep 14Sep 22Assignment 1 is out!
Sep 22Sep 29Assignment 2 is out!
Sep 28Oct 6Assignment 3 is out!
Oct 4Oct 13Assignment 4 is out!
Oct 13Oct 20Assignment 5 is out!


Lecture 1Sep 8Presentation of the courseLecture 1, KattisGuide
Lecture 2Sep 15L2 : Data StructuresLecture 2, Assignment 1
Lecture 3Sep 22L3 : Sorting + StringLecture 3, Assignment 2
Lecture 4Sep 29L4: Algorithm Design Paradigms 1Lecture 4, Assignment 3
Lecture 5Oct 6L5: Algorithm Design Paradigms 2Lecture 5, Assignment 4
Lecture 6Oct 13L6: Algorithm Design Paradigms 3Lecture 6, Assignment 5
Lecture 7Oct 20L7: Graph TheoryLecture 7, Assignment 6
Lecture 8Oct 27L8: Computational GeometryLecture 8, Assignment 7
Lecture 9Nov 3L9: Algebra + Number TheoryLecture 9, Assignment 8
Lecture 9Nov 10L10: CombinatoricsLecture 10, Assignment 9
Contest 1Nov 17, 9:00am-12:00pm in ENGTR 3120Individual Contest
Contest 2Nov 24, 9:00am-12:00pm in ENGTR 3120Group Contest 1
Contest 3Dec 1, 9:00am-12:00pm in ENGTR 3120Group Contest 2



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