Announcements

  • Kattis Problems for week 9 released.

  • Jay, Timothy, and Joshua will be out the week of November 6 to attend the ICPC World Finals. Contest 2 will occur during the normal class time on Codeforces.

  • See external links for competitive programming courses at other schools.

  • Current Week Notes

Course Info

Welcome to CS93: Competitive Programming. This is a directed reading course that will introduce you to what competitive programming is and give you several tools and techniques for doing competitive programming well. Students will use either Python or C++ to solve competitive programming problems. Topics include: input/output; data structures including lists, stacks/queues, priority queues, and dictionaries, graph algorithms, dynamic programming, network flow, and other topics as time allows.

This course is designed for students of all levels who want to learn how to do well in competitive programming. It is also designed for students who are preparing for coding interviews.

Meeting Times:

We will meet Tuesdays 1:05 PM - 2:35 PM in Clothier 016.

Support Staff & Office Hours

Name Office Hours Location

Joshua Brody

TBA

SCI 260

Jay Leeds

TBA

TBD

Timothy Mou

TBA

TBD

Course Goals

By the end of the course, we hope that you will have developed the following skills:

  • You will know how to solve basic competitive programming problems.

  • You will learn and understand how to use several standard data structures.

  • You will have a deep understanding of how to process input and output in C++ and/or Python.

  • You will understand how to distinguish easy from hard problems quickly.

  • You will be able to apply standard algorithmic design techniques to solve computational problems of moderate difficulty. You will be able to write programs solving these problems from scratch.

Above all, the goal of this course is to instill a deep understanding of how to quickly understand computational problems, derive a solution, and code that solution efficiently.

Schedule

WEEK DAY ANNOUNCEMENTS TOPIC NOTES & PROBLEMS
1

Aug 30

 

Course Introduction

  • What is competitive programming?
  • programming contest format
  • online judges, feedback
  • Setting up Kattis account
  • Setting up CodeForces account

Kattis Problems:

Codeforces week 1 problems

2

Sep 06

Drop/Add Ends (Sep 09)

Input/Output

Kattis Problems:

Codeforces week 2 problems

3

Sep 13

 

Lists

Kattis Problems:

Codeforces week 3 problems

4

Sep 20

 

Dictionaries

  • Identifying Easy Problems
  • Dictionaries
  • Big-O notation

Kattis Problems:

Codeforces week 4 problems

5

Sep 27

 

Contest 1


6

Oct 04

 

Debugging


 

Oct 11

Fall Break

7

Oct 18

 

Stacks, Queues

  • Stacks
  • Queues
  • C++/Python implementation
  • Graph Algorithms

Kattis Problems:

Codeforces week 7 problems

8

Oct 25

 

Priority Queues

Kattis Problems:

Codeforces week 8 problems

9

Nov 01

 

Dynamic Programming

Kattis Problems:

Codeforces week 9 problems

 

Nov 08

ICPC World FInals

10

Nov 15

 

Math Problems


11

Nov 22

 

Network Flow


12

Nov 29

 

TBA


13

Dec 06

 

TBA



Grading Policies

You must take this course CR/NC. To earn a credit for this course, you must:

  • earn nine check marks for the semester. Each week you earn a check mark by solving at least one problem.

  • Participate in at least two practice contests. To earn credit for participating you must solve at least one problem on the contest.

  • If you have already taken CS41, are a senior, and/or did competitive programming at Swarthmore last year, you will be responsible for choosing an advanced competitive programming topic, preparing a lecture on it, and giving that lecture the second half of the semester. You can work on this with up to two other students.

Class attendance

You should attend every class. If you need to miss a class or circumstances arise that make it difficult or impossible to attend, please let me know as soon as possible.

How to suceed in CS93

  • Attend Class

The primary introduction to course material is through class lecture. Our expectation is that you will attend class each week, study notes from lectures as you need to, and independently seek out help when you have questions.

  • Ask Questions if you don’t understand

There are lots of opportunities to ask questions: attending class, during office hours, posting on Slack. The problems we work on will build from material throughout the semester, so if you don’t understand something one week, it is likely to reappear (and be a problem!) the next week, and the week after that, and so on.

  • Practice, practice, practice

This class is very much a class where you learn by doing. The vast majority of time you spend on this class will be coding competitive programming problems. Get into the habit of spending at least five hours each week on programming problems. Become familiar with the data structures and graph algorithms we see this semester by using them to solve more problems.

  • Set goals and commit to achieving them

This course is designed to accomodate students of all backgrounds and levels of experience. Some students are taking this course to get better at competitive programming; others to practice for technical interviews. What you get out of this class will be largely up to you. This will be a successful class for you if you set goals for what you want out of this class and commit to achieving them.

  • Self-advocate

Since this is a directed reading course, the responsibility for you getting the most out of this course lies with you. If there is some aspect of this course that isn’t working for you, or if you think part of this course could be improved, say so.

Academic Integrity

Academic honesty is required in all your work. Under no circumstances may you hand in work done with or by someone else under your own name. Discussing ideas and approaches to problems with others on a general level is encouraged, but you should never share your solutions with anyone else nor allow others to share solutions with you. You may not examine solutions belonging to someone else, nor may you let anyone else look at or make a copy of your solutions. This includes, but is not limited to, obtaining solutions from students who previously took the course or solutions that can be found online. You may not share information about your solution in such a manner that a student could reconstruct your solution in a meaningful way (such as by dictation, providing a detailed outline, or discussing specific aspects of the solution). You may not share your solutions even after the due date of the assignment.

In your solutions, you are permitted to include material which was distributed in class, material which is found in the course textbook, and material developed by or with an assigned partner. In these cases, you should always include detailed comments indicating on which parts of the assignment you received help and what your sources were.

When working on quizzes, exams, or similar assessments, you are not permitted to communicate with anyone about the exam during the entire examination period (even if you have already submitted your work). You are not permitted to use any resources to complete the exam other than those explicitly permitted by course policy. (For instance, you may not look at the course website during the exam unless explicitly permitted by the instructor when the exam is distributed.)

Failure to abide by these rules constitutes academic dishonesty and will lead to a hearing of the College Judiciary Committee. According to the Faculty Handbook:

_ Because plagiarism is considered to be so serious a transgression, it is the opinion of the faculty that for the first offense, failure in the course and, as appropriate, suspension for a semester or deprivation of the degree in that year is suitable; for a second offense, the penalty should normally be expulsion. _

This policy applies to all course work, including but not limited to code, written solutions (e.g. proofs, analyses, reports, etc.), exams, and so on. This is not meant to be an enumeration of all possible violations; students are responsible for seeking clarification if there is any doubt about the level of permissible communication.

The general ethos of this policy is that actions which shortcut the learning process are forbidden while actions which promote learning are encouraged. Studying lecture materials together, for example, provides an additional avenue for learning and is encouraged. Using a classmate’s solution, however, is prohibited because it avoids the learning process entirely. If you have any questions about what is or is not permissible, please contact your instructor.

Integrity in Competitive Programming

For this course, you are expected to work on the first problem each week alone. Once you earn a check mark for the week, you are allowed and encouraged to work with partner(s).

Practice Contests will be either individual or team contests. You must work alone for individual contests, and you must work only with your teammates for team contests.

Slack

In addition to class time and open practice sessions, we’ll be using Slack. You can post questions about specific problems there, discuss techniques, etc. Note: this is the same slack workspace that will be used by other students who are practicing for ICPC this semester. There will be many more students in this workspace than are taking the class. There is a channel called directed-reading for class-specific questiosn.

Academic Accommodations

If you believe you need accommodations for a disability or a chronic medical condition, please contact Student Disability Services (via email at studentdisabilityservices@swarthmore.edu) to arrange an appointment to discuss your needs. As appropriate, the office will issue students with documented disabilities or medical conditions a formal Accommodations Letter. Since accommodations require early planning and are not retroactive, please contact Student Disability Services as soon as possible.

For details about the accommodations process, visit the Student Disability Services website.

To receive an accommodation for a course activity, you must have an official accommodation letter from the Office of Student Disability Services and you need to meet with course staff to work out the details of your accommodation at least two weeks prior to the activity.

You are also welcome to contact any of the course staff privately to discuss your academic needs. However, all disability-related accommodations must be arranged, in advance, through Student Disability Services.

Links that are related to the course may be posted here. If you have suggestions for links, let us know.