CS3233 - Competitive Programming


This module aims to prepare students in competitive problem solving.

It will benefit NUS students who want to compete in ICPC, invited high school students (for online contests only) who want to compete in IOI (not just for NOI), and NUS students in general who aspire to excel in technical interviews of top IT companies, especially NUS current (2022++) ICPC donors: Sea Group and Jump Trading (renewals with other donors are still in negotiation as of 01 January 2022).

It covers techniques for attacking and solving challenging* computational problems. Fundamental algorithmic solving techniques covered include complete search, divide/reduce/transform and conquer, greedy, dynamic programming, etc. Domain specific techniques like graph, mathematics-related, string processing, and computational geometry will also be covered. Some additional topics may be included depending on how the semester progresses. Programming language libraries that are commonly used in problem solving will also be taught.

*We only study well-known/solved problems, not research problems.

Note: This introductory message will not be prominent the next time you visit this URL again. This behavior is normal. You can view it again by scrolling to the top of this page.

Course Registration

As of 9 Feb 2022: There are 28+1 admin students (class record?), inclusive of 4 female students (also a class record?).

Useful information to help you decide on whether you should offline register for CS3233:

  1. Do you have national (but preferably international) programming competition background before? Examples: NOI (or IDN OSN, VNM VNOI, CHN NOIP, MYS MCO, PHL NOI, IND ICO, etc), IOI (especially IOI 2020 (Online Competition) and/or IOI 2021 (Online Competition) hosted by Singapore/NUS), ICPC (especially ICPC Asia Singapore Regional Contest 2015/2018), Google Code Jam, Facebook Hacker Cup, CodeForces rated rounds, Topcoder Open, etc?

    The difficulty of this course is very extreme for those without such background... but typically those that satisfy the next requirement (see question 2) can survive just as well... We will study problems that require (advanced) data structure and/or algorithms that are typically asked in programming competitions, and we have to implement those solutions fast and without bug...

  2. Did you score well (at least A-) in CS1010/variant and CS2040/variant (and preferably score A+ in all; CS3230 (and CS4234) are good to have but optional)?

    This module has a very high performance bar and the average CAP of the students enrolled in the past academic years excluding recent AYs (cannot track anymore since AY 2019/20 onwards) were 4.57 , 4.78 (remember, year 1 nowadays have much more S/U options) , 4.3+ (not tracked, I didn't survey that AY) , 4.33, 4.44, 4.43, 4.45, and 4.30 (out of 5.00), respectively. You will need special permission from the instructor (Dr Steven Halim) if you do not satisfy the pre-requisites listed above (the filter is there for your own good).

  3. Are you OK to be tortured for one semester for a mere 4 modular credits (your other modules may also suffer)?

    You may have to take lighter set of other modules or be ready to S/U other modules or to rush course project submissions (for project-based modules that have STePS on Wednesday night of Week 13 — no longer clash with CS3233 Monday night classes) or to rush final assessment preparations for other modules only during study week (no final assessment for CS3233). Please do NOT take CS3233 module with another module that is known to be challenging/demanding (e.g., the 5 MC CS3217 in Sem2, among others) unless you are very confident of yourself and have historical academic performance to back that up. Moreover, your ego may be hurt if some of the young NOI trainees (Sec2-JC2 students) beat you in (many) CS3233 contests (probably they still join the contests in online mode only due to COVID-19 and MOE rules of no intermingling between schools...). Try to ask CS3233 seniors who have taken (and survived) this module before applying, read their public stories, e.g., Lim Jay Ching (exchange from University of Waterloo), or read several NUSWhispers related posts about CS3233!

  4. Are you thinking on applying to top (or emerging) IT companies like NUS current (2019/20 and 20/21; list to be refreshed by January 2022) ICPC donors: Indeed Singapore, Sea Group, SenseTime, Jump Trading, Citadel | Citadel Securities, HRT, DRW; or other large IT companies like Google, Facebook, Microsoft, Dropbox, etc in the future?

    Some of our ex-CS3233 graduates are now in those companies :). See the CS3233 Hall of Fame to see the current known status of CS3233 past top students. Since a few AYs ago, many of these company (HR) reps will (now e-)visit some of our (mini) contests and give prizes and/or recruitment talks which may be (much) faster than normal application route... Some seniors have cited that these direct connections with top IT companies is actually one of the nicest features of CS3233...

  5. Can you code in C++ (primary language), Python (second choice), and/or Java (third choice)?

    We will use C++ (17), Python (3), and Java (17) in CS3233 S2 AY 2021/22 (in that order :O). In this course, we are expecting students to be multi-lingual :O. Although a few ex-students had survived CS3233 with only (or mostly) Java and/or the slower Python, they struggled more compared to those who are well versed in C++ (fastest programming language for programming competitions). Since AY 2018/19, Python (3) has been used and has given some advantage at certain problems for students who master this language. However, Python code is usually slow (albeit usually also shorter). An algorithm written in Python may get TLE while the same algorithm written in C++/Java pass the time limit.

  6. Do you want to learn interesting data structures, algorithms, (other programming language especially if C++ is not your primary language) and more importantly: On how to apply them properly — from teaching staffs who are deeply involved in such programming competitions?

    (Senior) Lecturer: Dr Steven Halim, current Singapore IOI team leader, Deputy Director for IOI 2020 and IOI 2021 in Singapore (both end up became online competitions), NUS ICPC coach, ICPC Asia Singapore Regional Contest Director (2015 and 2018), the author of Competitive Programming text book (the official text book of this module, we will use CP4 Book 1 and Book 2).

    Rating (out of 5.0, SoC avg ~4.1) Jan-Apr 2022 (n=28) Jan-Apr 2021 (n=18) Jan-Apr 2020 (n=12) Jan-Apr 2019 (n=22) Jan-Apr 2018 (n=21) Jan-Apr 2017 (n=16)
    Module feedback Target ≥ 4.5 4.8 4.9 (PB) 4.6 4.8 == 4.8
    Module difficulty Target ≤ 4.2 4.3 4.2 4.3 4.1 4.3
    Steven's teaching Target ≥ 4.5 4.9 (PB) == 4.9 (PB) 4.5 4.8 == 4.8

    Qualified Teaching Assistant:

    1. Vuong Hoang Long, CS3233 winner S2 AY 2019/20, ICPC World Finalist 2021 (MLG)
    2. Dan Alden Varsobia Baterisna, CS3233 winner S2 AY 2020/21
    3. Zhang Guangxuan, ICPC World Finalist 2021 (MLG), problem setter only, for contest style diversity
    4. Marc Phua Hsiao Meng, problem setter only, for contest style diversity
    5. Lim Dewen Aloysius, problem setter only, for contest style diversity

    Usually, CS3233 TAs have teaching feedback rating of around ~4.5 too (i.e., very good).
    TA will be mostly available in NUS ICPC Lab (COM1-02-15), especially every Monday, 4.00-5.30pm to answer any CS3233/Competitive Programming queries, if any (or e-consultations via Zoom if necessary).

  7. Are you OK to have your coding style 'somewhat damaged' because of this course?

    Known damages are (illustrations are in C++), but not limited to:

    1. One character variable names (why type more than necessary), e.g., int i,j,k,l,m,n,u,v,w; (PS: i,j,k,l for up to 4-nested loop counter variables, m,n for number of edges/vertices of a graph, and u,v,w for reading directed edge (u → v) with weight w)
    2. Putting all those variables as global variables (so that you never have to pass them as function parameter(s) — even by reference, especially the heavy ones like multi-dimensional arrays — to reduce 'out of stack space'/'stack overflow' issue)
    3. Intentional memory wastage by declaring big arrays as global variable (usually DP table) as big (or slightly bigger) as the problem statement says, e.g., int memo[1000][1000][2]; although we may only use parts of it on many smaller test cases
    4. If local (loop) variables are needed, use for-loop's initialization part (why waste additional lineS), e.g., for (int i=0,ans=0,flag=1;i<N;++i){...}
    5. Using autos everywhere and let the compiler do the variable type deduction work, e.g., for (auto& [v,w]:AL[u]){...}
    6. No comment (compiler doesn't need that to compile your code and you won't read your own code after end of contest/max 5 hours, so why write comments?)
    7. No function other than int main() unless you need to write a recursive function (your compiler just need this to run your code!)
    8. No space unless absolutely necessary (your compiler understands that :O), e.g., for(sum=i=0;i<N;++i)sum+=(A[i]>0?A[i]:0);
    9. One-liner-ing selection/repetition command/body if they are short, e.g., if (x>0) ++y,++z;, for (int i=0,j=1;i<N;++i,j*=2) or while (scanf("%d",&N),N){...} (yes, you can use commaS)
    10. Use (uhuk... nested...) ternary operation (condition1)?(condition2?if_1true2true:if_1true2false):(if_1false); as far as possible if that helps you to one-liner several standard if-elseif-else lines...
    11. Inlining (and one-liner-ing) short functions like inline inside(int r,int c){return r>=0&&r<R&&c>=0&&c<C;} for slightly faster speed
    12. As we want to shorten SLOC as far as possible, obviously we do not need to use blank line to separate logical blocks of code
    13. Excessive usage of constants/macros and typedefs, e.g., const int INF=1e9; const int MOD=1e9+7; typedef long long ll; typedef tuple<int,int,int> iii;
    14. Use bitmask operations whenever possible, e.g., printf("%d\n", __builtin_popcount(m));
    15. Including all libraries upfront, much more than possibly necessary, to avoid silly compilation errors albeit (slightly) increase compilation time, e.g., #include <bits/stdc++.h>
    16. 'Hack' C++ STL defaults to suit our needs, e.g., inserting negated input integers into priority_queue<int> pq; to make it into a Min-PQ instead of default Max-PQ (instead of definining our own comparison function)
    17. Intentional memory leaks, e.g., instead of wasting runtime 'free'ing deleted vertices in a pointer based segment tree, we just re-initialize a new segment tree for another test case (especially after seeing memory limit = 2GB, for example)
    18. On some rare occassions, we use the 'forbidden' goto statement...
    19. Using C++ operator shortcuts as far as possible, e.g., ++i; i*=2; i%=7;
    20. using namespace std (as there is no other namespace to consider in a short C++ program)
    21. And many scary stuffs that are hated by SE purists, e.g., fellow SE professors in SoC Prof Ben, Prof Damith, et al...

    Fortunately, it is known that past CP-ers can somehow undo these damages to return back to normal SE practices, e.g., this one (so don't worry my fellow SoC SE colleagues :).

If you have read all (scary) questions above and are still interested, simply notify Steven for offline registration before round 3 (the last day of application). The offline registration will be closed as soon as the number of students hits 19 31 accepted NUS students.

This AY, we will again *NOT* be joined ONSITE by about ~20 SG high school students but some of them may join online due to COVID-19 restrictions.

To minimize the annual attrition rate on Week 02 (Drop without penalty) and also :O on Recess Week (Drop with a 'W' grade, it happens!), the pre-acceptance selection will be made reasonably rigorous, i.e., by showing Steven that the applicant can score at least 500.0 Kattis points by Friday, 31 December 2021, 23.59.

Note: This course registration section will not be prominent from Monday, 10 January 2022 onwards (Week 01). This behavior is normal. You can view it again by scrolling to the top of this page.


Date News

Class Ranklist for S2 AY 2021/22

R Flag Nickname/Kattis (CF) Spe Dil Tot
1 IDN IDN Rama (rama_pang) 52.0 47.6 99.6 (A+)
2 VNM VNM Hong Duc (user202729_) 52.0 47.1 99.1 (A+)
3 MNG MNG Amar (nvmdava) 47.5 41.6 89.1 (≥ A)
4 IND IND Udit (T1duS) 42.4 45.6 88.0 (≥ A)
5 BGD BGD Rezwan (Rezwan.Arefin01) 35.5 48.6 84.1 (≥ A)
5 IDN IDN Berted (Berted) 37.0 49.5 86.5 (≥ A)
7 IND IND Shacha (SleepyShashwat) 37.5 46.1 83.6 (≥ A)
8 SGP SGP nickyfoo (nickyfoo) 32.5 49.6 82.1 (≥ A)
9 SGP SGP Yong Xiang (no CF yet) 33.0 46.0 79.0 (≥ A-)
10 THA THA Pontakorn (peppapig) 33.5 44.6 78.1 (≥ A-)
11 USA USA Ethan (no CF yet) 34.0 42.0 76.0 (≥ A-)
12 IDN IDN Pa.Nic (Pa.Nic) 32.0 42.1 74.1 (≥ A-)
13 MYS MYS Ryan (no CF yet) 28.0 46.0 74.0 (≥ A-)
14 VNM VNM Hoang Kien (Maripium) 44.0 29.5 73.5 (≥ A-)
15 IDN IDN Audrey (no CF yet) 24.9 47.0 71.9 (≥ A-)
15 CHN CHN Li Jiayu (no CF yet) 27.0 42.5 69.5 (≥ B+)
17 SGP SGP Frederick (no CF yet) 22.5 46.1 68.6 (≥ B+)
18 SGP SGP Kevin (no CF yet) 21.9 49.0 70.9 (≥ A-)
19 SGP SGP Kai'an (no CF yet) 24.0 46.5 70.5 (≥ A-)
20 SGP SGP Jia Lin (no CF yet) 21.9 46.5 68.4 (≥ B+)
21 SGP SGP Yi Qun (hengyiqun) 19.0 46.5 65.5 (≥ B+)
22 SGP SGP Genie (no CF yet) 19.9 43.6 63.5 (≥ B+)
23 SGP SGP Kendrick (no CF yet) 17.0 45.0 62.0 (≥ B+)
24 SGP SGP Nicholas (no CF yet) 12.0 42.6 54.6
25 MYS MYS Yong Ler (yongler) 14.0 38.6 52.6
26 SGP SGP Li Shuo (no CF yet) 11.0 28.0 39.0
27 IDN IDN Andrew (no CF yet) 14.0 24.0 38.0

Lesson Plan

Week Self Reading from CP4 before class
(Flipped Classroom)
(Mon, 9.00am)
Contest + Debrief
(Mon, 5.30-6.45-7.15pm, PL2+4)
Class Topics
(Mon, 7.30-9.00pm, PL2+4)
Past classes more than one week ago are hidden so that we can focus on the current and future classes, but you can restore them by clicking 'Show Past' button above
As many pages from CP4 Book 1+2; at least from preface up to the end of Chapter 4 (the entire Book 1 basically); Note: For the actual semester, you must have a copy of CP4 (both book 1+2) to go through this course successfully; if you don't already have both books, go to @ NUS co-op or @ SIMCC e-Store to grab them. Lots of preparatory work especially for those who do not have competitive programming background yet

Optional Kattis set #00 starts on Wednesday, 29 Dec 2021, 22:30 SGT
No contest yet; But if you are not a multi-lingual programmer yet, pick up both C++17 (main), Python3 (secondary), and Java17 (tertiary) by yourself during holiday time At home: Set up a (free) Kattis account (open), solve first few easy ≤ 3.0 pointer problems @ Kattis, then use Dec21+early Jan22 holiday (~3-4 weeks) to get ≥ 500.0 points (~250 AC of ~2 pointer problems (first ~3+ pages sorted based on Kattis difficulty ratings :O), use Steven's classification here) in Kattis by Fri, 31 Dec 21, 23:59 (or earlier) to ensure module acceptance, familiarize yourself with Ubuntu 20 LTS with GNOME desktop, or self-read the older teaching materials in this public website
10 Jan
Preface to Chapter 1 (all pages) plus simple Ad Hoc problems in Chapter 2+3+9

Optional Kattis set #00 due

The official Kattis set #01 starts
Ad Hoc
(after first lecture)
Let's Talk CP

Introduction; Brief Course Admins; Focus on delivering some "Wow Moments"; A Bit of C++17, Python3, Java17, Mock/Preview Contest (not graded, but has high standard)
17 Jan
Chapter 2; Focus on Section 2.2 and 2.4.3
Read the rest of Chapter 2 by yourself

Decision to Drop CS3233/R without penalty by Fri, 21 Jan 22 (email UG office for manual drop, cc to Dr Steven Halim; avoid weekend >.<)
HW01 due
Kattis set #01 due

and Kattis set #02 starts (we repeat this pattern until Set #12)
Mini 01
"~Linear" Algorithms
Money Contest
sponsored by
[two ICPC donors]

Be A Librarian

Mastery of Libraries (C++ STL, Python Standard Library, & Java API); Focus on Bit Manipulation and Binary Indexed (Fenwick) Tree
VisuAlgo: bitmask, fenwicktree, and segmenttree (optional)
24 Jan
Chapter 3, 4, 8, and 9;
Focus on Section 3.1-2, 4.2.3, 4.4.2-3, 8.1-8.2, 8.6 (some NP-hard/complete problems with complete search solution), 9.20, and 9.21;
Read Section 3.3 (DnC) too, especially about BSTA
HW02 due
Solve Mini 01 B/C
Kattis set #02 due
Mini 02
Money Contest
sponsored by
[two ICPC donors]

(Binary) Searching for Answers

Iterative Techniques (the fancier ones); Recursive Backtracking (bitmask-based, reverse thinking, data compression, etc); State-Space Search (harder form of SSSP, Graph modeling + BFS/Dijkstra's) with Meet in the Middle (Bidirectional Search); and finally, what if we can 'guess' the answer in Binary Search fashion?
VisuAlgo: bitmask, recursion
31 Jan
CNY Reunion Dinner on Mon, 31 Jan
CNY Day 1 on Tue, 01 Feb
CNY Day 2 on Wed, 02 Feb
CS3233 class this week is canceled
[recharge our batteries here...]

Kattis set #03 is still due just before CNY Reunion Dinner!
07 Feb
Chapter 3, 4, 5, 6, 8, and 9;
Focus on Section 3.5, 4.6.1, 5.4, 5.5, 5.8, 6.3, 8.3, 8.5, 8.6 (some NP-hard/complete problems with DP solution), 9.3, 9.7, and 9.29
Read Section 3.4 (Greedy) too
HW03 due
Solve Mini 02 B/C
Kattis set #04 due
Mini 03
Complete/Binary Search
Money Contest
sponsored by
[two ICPC donors]

The Art of Stenography (or Being Greedy)

Dynamic Programming; "Instant" review of CS3230/CS4234 DP Materials; Focus on relationship between DP and DAG; Discussion of a few non-classic DP examples; Formulating non trivial DP states + transitions; DP vs greedy algorithm comparisons on some problems
VisuAlgo: bitmask, recursion
14 Feb
Chapter 8 and 9; Focus on Section 8.4, 9.24, and 9.25; Optional: Read the Max-Flow material of CS4234

Valentine's Day on Mon, 14 Feb
CS3233 class is *not* affected

NOI 2022 Competition is this Sat, 19 Feb 2022
(online qualification contest)
HW04 due
Solve Mini 03 B/C
Kattis set #05 due
Mini 04
DP or Greedy
Money Contest
sponsored by
[two ICPC donors]

(PS: We will do midterm team contest formation after Mini 04 so that you can practice as a team over Wk6 and/or recess week)

How to Prevent Flood?

Quick overview of Network Flow; Quick review of Ford-Fulkerson Max Flow algorithm variants: Edmonds-Karp and especially Dinic's (short comparison with Push-Relabel); Focus on Flow Graph Modeling skill and applications
VisuAlgo: maxflow
21 Feb
Although we are not supposed to have any face to face activity this week, nobody prevents you to keep solving Kattis problems (KS06 or more) 'by yourself' (or as a team of three) :). Again, peruse Steven's classification here, this time probably aiming for the 3-4+ pointer problems...

Decision to Drop CS3233/R with 'W' grade by Sun, 27 Feb 22
Kattis set #06, continued
No class
No class
28 Feb
Re-read Week 01-06 reading materials and CS1020/2040/C/S stuffs;
Re-read "standard" CS2040/C/S graph topics by yourself (Section 4.1-4.6)
HW05 pre-submission
Solve Mini 04 B/C
Kattis set #06 due
Midterm Team Contest (3 AYs ago)
Midterm Team Contest (2 AYs ago)
Midterm Team Contest (last AY)
Midterm Team Contest (this AY)
Week01-06 + CS2040/C/S
5.30-9.30pm (4h)
Money Contest
sponsored by
[two ICPC donors]

Starts at 5.30pm SGT, ends at 9.30pm SGT (4 hours)

No lecture, we will do Midterm Team Contest
VisuAlgo (for self-review): heap, hashtable, bst, graphds, dfsbfs, ufds, mst, sssp

This Midterm Team Contest is on Kattis
07 Mar
Chapter 4 and 8; Focus on Section 4.6 (Bipartite Graph) and 8.5;
Then read Section 9.26, 9.27, 9.28, 9.29;
We postpone Graph Matching in special cases of NP-hard problems (8.6) to Week 09
HW06 due
(upsolve some non AC Midterm Contest problems by yourself, optional)
Kattis set #07 due
Mini 05
Network Flow
Money Contest
sponsored by
[two ICPC donors]

Social Development Network

Quick overview of Graph Matching; Unweighted MCBM; Greedy Bipartite Matching, Focus on (Bipartite) Graph Modeling skill and applications; Quick Discussion on Weighted MCBM (Kuhn-Munkres/Hungarian algorithm); Review of DP bitmask for Graph Matching (any variant, but on small graph) -- (Edmonds' Matching algorithm shelved)
VisuAlgo: maxflow, matching
14 Mar
Chapter 8; Focus on the Section 8.6; Optional: Read the first 1/3 of CS4234 material

NOI 2022 Competition is this Sat, 19 Mar 2022
(onsite for up to top 35+7 banned Singaporeans only)
HW07 due
Solve Mini 05 B/C
Kattis set #08 due
Mini 06
Money Contest
sponsored by
[two ICPC donors]

Coping with (NP-)hard Problems

Summary of 2/3 of CS4234 - Optimisation Algorithms (except local search) in CS3233 style.
VisuAlgo: mvc, steinertree, tsp
21 Mar
Chapter 5 and 9; Focus on Section 5.3-5.6 + 9.36;
Read the rest of Chapter 5 by yourself;
Plus Section 9.9, 9.11, 9.15, 9.16, and 9.30

HW08 due
Solve Mini 06 B/C
Kattis set #09 due
Mini 07
(NP-)hard Problems
Money Contest
sponsored by
[three++ ICPC donors]


Mathematics overview with a movie; Focus on Java/Python Big Integer, Combinatorics, Number Theory (Extended Euclid, Modular Inverse, Fermat's little theorem, Chinese Remainder Theorem), and a bit of Probability
VisuAlgo: cyclefinding
28 Mar
Chapter 6; Focus on Section 6.6 + 9.45;
Read the rest of Chapter 6 by yourself
HW09 due
Solve Mini 07 B/C
Kattis set #10 due
Mini 08
Money Contest
sponsored by
[three++ ICPC donors]

(we have taken a class photo #1 and it is good)

A Glance at Bioinformatics

String Processing; Focus on Suffix Trie, Suffix Tree, and Suffix Array; a bit of String Hashing
VisuAlgo: suffixtree, suffixarray
04 Apr
Chapter 7; Focus on Section 7.2, 7.3, 9.5;
Also Section 8.7 (problem decomposition)
Read the rest of Chapter 7 by yourself
HW10 due
Solve Mini 08 B/C
Kattis set #11 due
Mini 09
Money Contest
sponsored by
[three++ ICPC donors]

(final team contest formation will be done online using class Discord)
(we will take another class photo 2 as we missed 2 pax last week)

Inside Video Games

(Computational) Geometry; Focus on Algorithms on Points, Lines, a bit of 3D Geometry, and Polygon, Art Gallery Problem
VisuAlgo: polygon, convexhull

(Steven will run a short last lecture to close the module)
The Last Lecture (8.40-9.10pm)
11 Apr
The entire CP4 book 1+2 and beyond

Good Friday and Easter Sunday this Week
Solve Mini 09 B/C
Kattis set #12 due

HW05 final submission
is deferred to
Fri 22 Apr 2022
Final Team Contest (3 AYs ago)
Final Team Contest (2 AYs ago)
Final Team Contest (last AY)
Final Team Contest (this AY)
Week01-12 stuffs
5.30-9.30pm (4h)
Money Contest
sponsored by
[two++ ICPC donors]

Join NUS ICPC team selection (~Early? September? 2022)
If COVID-19 situation
is better
Starts at 5.30pm SGT, ends at 9.30pm SGT (4 hours)

No lecture, we will do Final Team Contest

This Final Team Contest will be on Kattis
No final assessment, go and save your other modules after tonight
(PS: esp if you have submitted HW05)

Hall of Fame

This table records the previous top students of CS3233 under Dr Steven Halim (rank 1 up to at most rank 3) of that Academic Year and their current known affiliation as per last contact with Dr Steven Halim.

AY (Iteration) Rank Flag and Name Best ICPC Record Current Job
2008/09 (1) 1 VNM Ngo Minh Duc World Finalist 2009 (HM) & 2010 (HM) Addepar (US)
2008/09 (1) 2 VNM Nguyen Hoanh Tien World Finalist 2009 (HM) & 2010 (HM) Microsoft (US)
2009/10 (2) 1 VNM Trinh Tuan Phuong World Finalist 2012 (HM) & 2013 (joint-48) Quantcast (SG)
2010/11 (3) 1 SGP Koh Zi Chun World Finalist 2012 (HM) Microsoft (US)
2010/11 (3) 2 IDN Harta Wijaya World Finalist 2012 (HM) & 2013 (joint-48) Facebook (US)
2011/12 (4) 1 CHN Yang Mansheng N/A Dynamic Technology Lab (SG)
2012/13 (5) 1 VNM Nguyen Tan Sy Nguyen World Finalist 2013 (joint-48) & 2016 (joint-14) Anduin Transactions (VN)
2013/14 (6) 1 IDN Nathan Azaria World Finalist 2014 (joint-19) & 2015 (joint-28) Facebook (US)
2013/14 (6) 2 IDN Jonathan Irvin Gunawan World Finalist 2014 (joint-19) & 2015 (joint-28) Jump Trading (SG)
2014/15 (7) 1 IDN Stefano Chiesa Suryanto Fourth place in Regional Asia Singapore 2015 Improbable (UK)
2014/15 (7) 2 VNM Vu Dinh Quang Dat World Finalist 2015 (joint-28) & 2018 (joint-56) Dynamic Technology Lab (SG)
2015/16 (8) 1 VNM Nguyen Quang Dung Tenth place in Regional Asia Phuket+Singapore 2015 Graduated
2015/16 (8) 2 VNM Truong Ngoc Khanh Twentieth place in Regional Asia Singapore 2015 Sea Group (SG)
2016/17 (9) TA/Exempted SGP Gan Wei Liang Champion in Regional Asia Manila 2017+Nakhon Pathom 2018 Jump Trading (SG)
2016/17 (9) 1 SGP Tan Jun An Sixteenth place in Regional Asia Singapore 2018 Google (SG)
2016/17 (9) 2 IDN Agus Sentosa Hermawan World Finalist 2017 (joint-20) Sirclo (ID)
2017/18 (10) TA/Exempted SGP Ranald Lam Yun Shao Champion in Regional Asia Manila 2017+Nakhon Pathom 2018 Jump Trading (SG)
2017/18 (10) 1 PHL Robin Christopher Cham Yu Third place in Regional Asia Jakarta 2018+2020 Sea Group (SG)
2017/18 (10) 2 IDN Sergio Vieri Third place in Regional Asia Jakarta 2018+2020 Google SG
2017/18 (10) 3 SGP Bay Wei Heng World Finalist 2019 (joint-62) & 2020 (invitational contest - honor) Jane Street
2018/19 (11) Exempted SGP Bernard Teo Zhi Yi World Finalist 2019 (joint-62) & 2020 (invitational contest - honor) Hudson River Trading
2018/19 (11) Exempted SGP Lim Li World Finalist 2022 (Sometime in 2023) Stripe
2018/19 (11) 1 VNM Nguyen Dinh Quang Minh World Finalist 2018 (joint-14) & 2021 (6-11 Nov 2022) 4th year UG
2018/19 (11) 2 VNM Tran Tan Phat Champion in Regional Asia Jakarta 2019 4th year UG
2018/19 (11) 3 IDN Herbert Ilhan Tanujaya N/A Momos.io
2019/20 (12) Exempted SGP Gabriel Goh Kheng Lin Third place in Regional Asia Jakarta 2020 3rd year UG
2019/20 (12) 1 VNM Vuong Hoang Long World Finalist 2021 (6-11 Nov 2022) 3rd year UG
2020/21 (13) Exempted SGP Zhang Guangxuan World Finalist 2021 (6-11 Nov 2022) 2nd year UG
2020/21 (13) Exempted SGP Clarence Chew Xuan Da Third place in Regional Asia Jakarta 2020 2nd year UG
2020/21 (13) 1 PHL Dan Alden Varsobia Baterisna Tenth place in Regional Asia Jakarta 2021 2nd year UG
2021/22 (14) Exempted SGP Huang Xing Chen Seventeenth place in Regional Asia Jakarta 2021 1st year UG
2021/22 (14) Joint-1 IDN Rama Aryasuta Pangestu Second place in ICPC Asia Jakarta 2021 1st year UG
2021/22 (14) Joint-1 VNM Bui Hong Duc World Finalist 2021 (6-11 Nov 2022) 1st year UG

Scoring Scheme for CS3233 S2 AY 2021/22

There are two big scoring components: SP(eed) (from live contests, up to 58%) and DI(ligence) (from non-speed-related stuffs, up to 55%).
The theoretical max is therefore 113%, with just 60% needed to secure at least a B+ grade in this extremely competitive module.
The SP(eed) component is further divided into two sub-components: M(ini)C(ontest) (up to 36%) and T(eam)C(ontest) (up to 22%).
The DI(ligence) component is further divided into four sub-components: H(ome)W(ork) (up to 15%), (Problem)Bs (up to 10%), K(attis)S(ets) (up to 12%), and Ac(hievements) (up to 18%).

MC = Weekly Mini Contest (36%)

9 Weekly Mini Contests, three problems in 75 minutes, using https://cs3233.com (new system) or fallback to Mooshak (old system).
(9 weeks x (3%+0.5%+0.5%)/week = 36%).

  1. very easy/easy/warm-up/1-2 simple CP technique(s): 1%.
  2. medium/last week material, 2%; may have weakened subtask for 1%.
  3. usually very hard and from topics not specifically taught in class (or taught in latter part of the class -- suitable for senior students only), for CS3233R students, bonus 0.5% for CS3233/R students who can get this AC in contest time.

Occasionally (if Steven is not that lazy), we may open problem D (or even E) which is (are) the easier form of problem B/C. We give bonus 0.5% for top 3 in each mini contest. We use strict binary grading (Accepted or not Accepted: Wrong Answer, Time Limit, Memory Limit, Runtime Error, etc) for our contests.

Two Team Contests (22%)

1 Midterm Team Contest (11%+0.5%=11.5%, 11 "original" problems, worth 1.0% each).
1 Final Team Contest (10%+0.5%=10.5%, 10 "original" problems, worth 1.0% each).
Bonus 0.5% for top 3 teams in both team contests.
Team size is three students.
If the class size is not divisible by 3, the last team can have 4 or 5 members.

Weekly Homework (15%)

10 Weekly Homework (10 weeks * 1.5%/week = 15%).
CP4 book 1+2 review + solve certain written exercises + update the lecturer, 1.5%.
Scoring scheme: 0% = no submission, 0.5% = poor, 1% = default score, 1.5% superb.

Problem Bs (10%)

Solve problem B of last week's mini contest at home, on your own pace, by next Mon 05.15pm (closed by the time TA consultation hour is over), if you fail to solve it during the live Mini Contest. Simply submit your code to cs3233.com (or to Mooshak), TA will check your last submission.

Scoring scheme:
0% = not AC in the actual mini contest and not attempted after one more week.
1% = managed to solve problem B during mini contest itself or before deadline.
There is no additional marks for solving problem C at home (for CS3233R students).

Kattis Set (12%)

We use NUS@Kattis for this semester.

Steven selects eight targeted Kattis problems related to CS3233 topic of that week (steven has solved seven of them before with one problem that he has not solved before). To get 1% per week, student has to solve at least three (of any preferred difficulty level as indicated in Kattis) of the selected problems within the stipulated deadline (Monday night 09:00pm SGT of that week until Monday 05:30pm SGT of the following week). Note that Steven can see all CS3233 class submissions at nus.kattis!

  • Set #00, Competitive Programming Preview (not graded)
  • Set #01, Ad Hoc
  • Set #02, Data Structures and Libraries
  • Set #03, CNY period: CS2040/C/S++ Basic Graph Review (Graph Traversal, MST, SSSP, APSP, Special Graphs)
  • Set #04, Complete Search and easier BSTA+Other
  • Set #05, Dynamic Programming
  • NUS recess week (nothing is due this week)
  • Set #06, Greedy and Network Flow
  • Set #07, Easier Mathematics
  • Set #08, Graph Matching and Miscellaneous 1
  • Set #09, NP-hard Problems and harder BSTA+Other
  • Set #10, Harder Mathematics
  • Set #11, String Processing
  • Set #12, Computational Geometry and Miscellaneous 2

Achievement System of CS3233 (18%)

One star = 1%, most achievements are manual entry:

  1. ***** Active in class: Subjective title for students who participated well during various class activities (answering in-lecture questions, asking/answering questions in real life or in our Discord server, consultations (with Steven/TAs on Mon 4.00-5.15pm), active in Kattis, etc), awarded by Steven/TAs throughout the semester (max claim: 5 times/student).
  2. *** Surprise us: Managed to surprise the teaching staffs by giving a better/more elegant solution/pinpoint bug in lecture, etc anytime during the semester (max claim: 3 times/student).
  3. * High determination: Objective title for students who always diligently solve (AC) problem B of all 10 weekly contests (inclusive of problem B of the Mock contest), be it during contest time or as homework assignment. This achievement will be auto updated by this system at the end of the semester.
  4. * Bookworm: Subjective title for students who diligently study and review CP4 book 1+2 by the end of Week12 (at least 10*1.5% - 0.5% = 14.5% score, i.e., at most one 1.0 with the rest 1.5). This achievement will be manually updated at the end of the semester.
  5. **** Kattis apprentice: Obtaining ≥ 5000 Kattis points (4% — it is not impossible, e.g., matthewng — hidden, marc-phua — hidden, and bayweiheng))/100 (3% — appear at ranklist page — there are ~17 NUS staff/students here)/200 (2%)/400 (1%) of Kattis ranklist by Sat, 07 May 2022, 23:59 (this achievement will NOT be updated instantly as this will keep changing every week).
  6. **** CodeForces Specialist: Given to student who also join CodeForces contests and attain rating of at least 2400 (Red color) (4%)/2100 (Orange color) (3%)/1900 (Violet color) (2%)/1600 (Blue color) (1%) by Sat, 07 May 2022, 23:59 (this achievement will NOT be updated instantly as this will keep changing every week).