Competitive Programming
CS 312 - Fall 2026
Course Staff
| Coach | Tiago Januario |
| Coach Assistants |
Luis Carvalho Jay Patel Saniya Kureshi Thun Jirachaisri |
Course Description
This course prepares students for technical interviews and ICPC-style competitive programming, emphasizing algorithmic problem solving, efficient C++ implementation, time and memory complexity analysis, independent debugging, contest strategy, and clear explanation of solutions. The course also emphasizes academic integrity and code ownership, ensuring that students develop both strong technical skills and responsible programming practices.
Course Format
- Format: 3-hour per week workshops with intense coding.
- Hour 1: Mini-Lecture (No Devices Allowed)
- Hour 2: Group Workshop (No Devices Allowed)
- Hour 3: Implementation Lab (Laptops Open)
- Laptops and phones are banned during Hours 1 & 2: If you open a device before Hour 3 starts, you may be marked abscent.
- No AI code generation: Tools like ChatGPT, Copilot, Claude, and Cursor are prohibited for writing code.
- Attendance: Mandatory for all lectures.
Communication and Office hours
- Online course communication happens through Piazza.
- Use public Piazza posts for general course questions.
- Use private Piazza posts for personal matters, accommodations, token requests, and code-related questions.
- Discussion Rules: Share ideas on Piazza, but never share your code publicly.
- Email should be used only when Piazza is unavailable or inappropriate.
- Check our Google calendar for our office hours.
Learning Goals
By the end of this course, you will:
- Translate programming logic into efficient C++ code.
- Master the Standard Template Library (STL).
- Identify common patterns in Technical Interviews.
- Manage time effectively during high-pressure contests.
We focus on:
- Debugging: Finding errors without help.
- Math & Logic: Thinking strictly and formally.
- Speed: Writing accurate code quickly.
- Consistency: Solving problems every single week.
Tools & Textbooks
Required Language and Software (No AI Allowed)
All submitted programming assignments must be written in C++ unless explicitly stated otherwise. Use one of these AI-Free editors.
- Geany - macOS/Windows/Linux
- CP Editor - macOS/Windows/Linux
- Code::Blocks - Windows/Linux
- Dev-C++ - Windows
Recommended Reading
- (CSES) Competitive Programmer’s Handbook by Antti Laaksonen (Free PDF).
- (CP3) Competitive Programming 3 by Steven & Felix Halim.
- (C++) C++ Tutorial by Alex Allain
- (Book) Fundamentals of C++ Programming by Richard L. Halterman
- Learn C++
- Introduction To C And C++ by MIT OpenCourseWare
- Programming: Principles and Practice Using C++ by Bjarne Stroustrup
- C++ Core Guidelines by Bjarne Stroustrup
Grading
The course uses a 1000-point system.
| Component | Points | Description |
|---|---|---|
| Weekly Coding Assignments | 300 | 12 assignments. Each week has 7 problems. Full credit requires solving 5 out of 7 problems. |
| Written Exams | 200 | 2 written exams, 100 points each. |
| Contests | 150 | 2 contests: one solo contest and one team contest. |
| Buggy Reports | 100 | 10 short debugging assignments. |
| Code Review Checks | 100 | Short individual meetings where students explain their submitted code. |
| Oral Exam | 150 | Required to pass. Students explain and defend one or more of their own submitted solutions. |
| Attendance | Required | Students must attend at least 75% of class meetings to pass. Attendance does not add points. |
Here is the course grade Scale
| Grade | Points |
|---|---|
| A | 930–1000 |
| A- | 900–929 |
| B+ | 870–899 |
| B | 830–869 |
| C | 700–829 |
| F | Below 700 |
A student will also receive an F if they:
- fail the Oral Exam,
- fail to meet the attendance requirement,
- commit a serious academic integrity violation.
The instructor may lower grade cutoffs, but cutoffs will not be raised.
Token Policy
Each student starts with 3 tokens. A token may be used to extend a weekly assignment deadline by 24 hours, or excuse one missed lecture. Tokens cannot be used for written exams, bug reports, contests, or the Oral Exam. Tokens cannot be used retroactively. Unused tokens have no grade value. To use a token:
- Complete the Token Request Form.
- Send a private Piazza post to the course staff.
- Do both before the relevant deadline.
Buggy Reports
Buggy Reports are collaborative team assignments (2–3 students) submitted on Gradescope. Teams analyze flawed C++ code, diagnose failure modes, and submit a single report containing:
- Root Cause: Concise technical explanation of why the code fails.
- Bug Identification: Exact line number(s) and error classification (e.g., TLE, logic error, undefined behavior).
- Minimal Counterexample: The smallest valid test case that triggers the failure.
- Patched Code: Corrected C++ snippet.
Note: One student submits per group and tags team members. Any group member may be asked to defend their report during individual Code Review Checks.
Weekly Coding Assignments
There will be 12 weekly coding assignments. Each assignment contains at least 7 problems. Full credit requires solving at least 5 problems.
Weekly Deadlines
| Deadline | Requirement |
|---|---|
| Tuesday 11:59 PM ET | Submit at least 2 accepted problems. |
| Thrusday 11:59 PM ET | Submit the remaining problems. |
Missing the Tuesday checkpoint results in a 10% penalty on that week’s assignment score unless a token is used before the checkpoint deadline. Students should submit problems as they solve them. Submitting many solutions in a short period of time may trigger an authorship review.
Written Exams
There will be 2 written exams, each worth 100 points. Written exams are closed-device and individual. Exams may include:
- algorithm design,
- complexity analysis,
- code tracing,
- debugging,
- proofs or correctness arguments,
- short C++ or pseudocode questions.
Contests
There will be 2 official course contests: Solo Contest and Team Contest. Contest rules will be announced before each contest. During contests:
- no AI tools are allowed,
- no public solutions or editorials are allowed,
- no communication outside the allowed team is permitted,
- all submitted code must be understood by the person or team submitting it.
Problems not solved during a contest may be upsolved by Monday 11:59 PM for 50% credit. Upsolving must follow the same academic integrity and AI rules as regular assignments.
Oral Exam
The Oral Exam is required to pass the course. Students will be asked to explain one or more of their own previous submissions.
| Component | Points | Description |
|---|---|---|
| High-Level Idea | 50 | Explain the algorithm and why it works. |
| Code Walkthrough | 50 | Explain variables, control flow, and implementation details. |
| What-If Question | 50 | Reason about a changed constraint, edge case, or code modification. |
A student fails the Oral Exam if they cannot explain the main idea of their own submitted solution. Failure of the Oral Exam results in an automatic F in the course.
Code Review Checks
Code Review Checks are a regular graded part of the course. Each student will complete 2 short individual code review meetings during the semester, worth 50 points each. During a Code Review Check, the student will be asked to explain one of their submitted solutions. The course staff may ask the student to:
- explain the high-level algorithm,
- walk through important parts of the code,
- explain the role of specific variables or functions,
- trace the code on a small input,
- analyze time and memory complexity,
- discuss an edge case,
- describe a bug they encountered,
- make a small modification to the code.
Students will receive reasonable notice before a Code Review Check. The specific problem to be discussed will be selected by the course staff.
| Component | Points | Description |
|---|---|---|
| Algorithm Understanding | 20 | Explains the main idea of the solution and why it works. |
| Code Understanding | 15 | Explains variables, functions, and implementation details. |
| Complexity and Edge Cases | 10 | Correctly analyzes complexity and discusses important edge cases. |
| Communication | 5 | Explains clearly and responds to questions thoughtfully. |
Academic Integrity and AI Policy
You may discuss ideas, but you may not share, view, copy, or submit someone else’s code. This is a strict C++ programming course. AI tools may not be used to generate assignment code.
Attendance Policy
Students must attend at least 75% of class meetings to pass the course. A token may be used to excuse a missed lecture. Students with documented accommodations should contact the instructor privately.
Schedule
| Date | Topics (Lecture) | Readings | Practice |
|---|---|---|---|
| Sep 04 |
Fast-Track C++ & STL
|
||
| Sep 11 |
Core Patterns I
|
||
| Sep 18 |
Core Patterns II
|
||
| Sep 25 |
Core Patterns III
|
||
| Oct 02 |
Recursion & Trees
|
||
| Oct 09 |
Midterm Week & Practice Defense
|
- |
|
| Oct 16 |
Graph Theory I
|
||
| Oct 23 |
Graph Theory II
|
||
| Oct 30 |
Dynamic Programming I
|
||
| Nov 06 |
Dynamic Programming II
|
||
| Nov 13 |
Advanced Structures
|
||
| Nov 20 |
Number Theory
|
||
| Nov 27 | Thanksgiving | Classes suspended | - |
| Dec 04 |
Final Exam
|
- | - |
| Dec 11 |
Final Oral Exam
|
- | - |