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 BecerraFriday 3:30pm-5:30pm (every two weeks)ENGTR 3110

Course Webpage:

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



Course Format:
The course consists of five 2-hour lectures, and three 3-hour lab meeting / programming contests. In addition to the 19 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 April.

Your final grade will be calculated as follows:

The contests will consist of 5-10 problems of varyingly difficulty to be solved in four 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
Jan 12First class of COMP321!
Jan 15Jan 28Assignment 1 is out!
Jan 26Feb 11Assignment 2 is out!
Feb 12Feb 25Assignment 3 is out!
Feb 26March 11Assignment 4 is out!
Mar 03March 20Assignment 5 is out!
Mar 26April 6Assignment 6 is out!
Apr 06April 13Assignment 7 is out!


Lecture 1Jan 12Presentation of the courseLecture 1, KattisGuide
Lecture 2Jan 12L2 : Data StructuresLecture 2, Assignment 1
Lecture 3Jan 26 L3 : Sorting + StringLecture 3, Assignment 2
Lecture 4Jan 26L4: Algorithm Design Paradigms 1Lecture 4, Assignment 2
Lecture 5Feb 9L5: Algorithm Design Paradigms 2Lecture 5, Assignment 3
Lecture 6Feb 9L6: Algorithm Design Paradigms 3Lecture 6, Assignment 3
Lecture 7Feb 23L7: Graph TheoryLecture 7, Assignment 4
Lecture 8Feb 23L8: Computational GeometryLecture 8, Assignment 4
Lecture 9Mar 2L9: Algebra + Number TheoryLecture 9, Assignment 5
Lecture 9Mar 2L10: CombinatoricsLecture 10, Assignment 5
Contest 1Mar 23, 1:35pm-5:25pm in ENGTR 3120Individual Contest Assignment 6
Contest 2Apr 6, 1:35pm-4:25pm in ENGTR 3120Group Contest 1 Assignment 7
Contest 3Apr 13, 1:35pm-4:25pm 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