Methods to Solve

(back to Competitive Programming Book website)

Dear Visitor,

If you arrive at this page because you are (Google-)searching for hints/solutions for some of these 2.95K+ UVa/Kattis online judge problems and you do not know about "Competitive Programming" text book yet, you may be interested to get one copy where I discuss the required data structure(s) and/or algorithm(s) for those problems :). Alternatively, you can also visit my other tool VisuAlgo (free) for animated explanations of some of those data structure(s) and/or algorithm(s).

If you arrive at this page because of CP3 (published 24 May 2013), please notice that this page contains the most up-to-date version of CPbook problem classification at UVa or uHunt pages (dubbed CP3.19a++, information is up to date as of 15 May 2019). The major update is the inclusion of ~1K+ Kattis online judge problems on top of the ~2K UVa online judge problems (there are some overlap, around 90+, search substring "also available at Kattis" / "also available at UVa" to find such problems).

Also, if you are a Google Chrome and Kattis user, use this nice Kattis Hint Giver created by one of my student Lin Si Jie that integrates this page directly with Kattis problems pages (you may want to occassionally 'Remove from Chrome' and re-'Add to Chrome' to manually sync this Methods to Solve content with the local cache).

Regards,
Dr Steven Halim, NUS ICPC head coach, ICPC Asia Singapore Regional Contest Director, Singapore IOI team leader, IOI 2020 Deputy Chairman.

Btw, browsing these ~3K problems may feel daunting for beginners, so feel free to use the following filters:

  1. NUS CS1010/E/S/CS1101S : (Basic) Programming Methodology level: I/O, Sequence, Selection, Repetition, Control Flow, Function, Easy Problems, 1D/2D Array, Simple Sorting, Binary Search, Basic Math, Basic String
  2. NUS CS2040/C/S : (Basic) Data Structures and Algorithms level: 1D/2D Array/Vector, Sorting, Linked List, Binary Heap, Hash Table, Binary Search Tree, Graph DS, Graph Traversal, SSSP
  3. NUS CS3230 : Design and Analysis of Algorithms level: Sorting (Harder), BF, D&C (+MatPow, Closest Pair), Greedy, DP (+APSP, Combinatorics, DP String), MST (+Union-Find), SSSP (Harder), String Matching, Convex Hull, NP-hard Problems
  4. NUS CS4234 : Optimisation Algorithms level: Complete Search (small instances), DP (esp Pseudo-Polynomial versions), NP-hard Problems, Max Flow, Graph Matching (+Weighted MCBM), Linear Programming
  5. CP3.19a, "Chapter 1 : Introduction" starred problems only or CP3.19a, all Chapter 1 problems
  6. CP3.19a, "Chapter 2 : Data Structures and Libraries" starred problems only or CP3.19a, all Chapter 2 problems
  7. CP3.19a, "Chapter 3 : Problem Solving Paradigms" starred problems only or CP3.19a, all Chapter 3 problems
  8. CP3.19a, "Chapter 4 : Graph" starred problems only or CP3.19a, all Chapter 4 problems
  9. CP3.19a, "Chapter 8 : More Advanced Topics" starred problems only or CP3.19a, all Chapter 8 problems
  10. Only starred problems from all chapters
  11. If no (or wrong) filter is specified, we will list down all problems, including all those uncategorized 'non-starred' problems (for NUS CS3233/ICPC: Competitive Programming level)

Problem Title CP3.19a++
Fetching from uHunt 3.5d, Coin-Change
Fetching from uHunt 3.5d, Coin-Change
Fetching from uHunt 3.5e, TSP
Fetching from uHunt 3.5d, Coin-Change
Fetching from uHunt 3.5d, Coin-Change
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 8.4a, NP-hard/C, small, Easier
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 4.6b, Network Flow, Variants
Fetching from uHunt 8.4a, NP-hard/C, small, Easier
Fetching from uHunt 4.8e, Bipartite Graph
Fetching from uHunt 3.5d, Coin-Change
Fetching from uHunt 4.6a, Network Flow, Standard
Fetching from uHunt 8.4a, NP-hard/C, small, Easier
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 9.kuhn, Kuhn Munkres's Algorithm
Fetching from uHunt 8.4d, NP-hard/C, special, Harder
Fetching from uHunt 8.4d, NP-hard/C, special, Harder
Fetching from uHunt 8.4b, NP-hard/C, small, Harder
Fetching from uHunt 8.4d, NP-hard/C, special, Harder
Fetching from uHunt 8.4d, NP-hard/C, special, Harder
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 8.4c, NP-hard/C, special, Easier
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 3.5d, Coin-Change
Fetching from uHunt 3.5d, Coin-Change
Fetching from uHunt 8.4b, NP-hard/C, small, Harder
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 9.kuhn, Kuhn Munkres's Algorithm
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 8.4c, NP-hard/C, special, Easier
Fetching from uHunt 9.kuhn, Kuhn Munkres's Algorithm
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 8.4b, NP-hard/C, small, Harder
Fetching from uHunt 3.5d, Coin-Change
Fetching from uHunt 4.8e, Bipartite Graph
Fetching from uHunt 4.6a, Network Flow, Standard
Fetching from uHunt 3.5d, Coin-Change
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 8.4c, NP-hard/C, special, Easier
Fetching from uHunt 4.6a, Network Flow, Standard
Fetching from uHunt 9.kuhn, Kuhn Munkres's Algorithm
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 4.6b, Network Flow, Variants
Fetching from uHunt 4.6b, Network Flow, Variants
Fetching from uHunt 3.5e, TSP
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 4.6b, Network Flow, Variants
Fetching from uHunt 8.4a, NP-hard/C, small, Easier
Fetching from uHunt 3.5c, 0-1 Knapsack
Fetching from uHunt 4.8e, Bipartite Graph
Fetching from uHunt 4.8e, Bipartite Graph
Fetching from uHunt 3.5e, TSP
Fetching from uHunt 4.6a, Network Flow, Standard
Fetching from uHunt 8.4b, NP-hard/C, small, Harder
Fetching from uHunt 8.4c, NP-hard/C, special, Easier
Kattis - aqueducts 9.kuhn, Kuhn Munkres's Algorithm
Kattis - avoidingtheapocalypse 4.6b, Network Flow, Variants
Kattis - beanbag 8.4b, NP-hard/C, small, Harder
Kattis - beepers 3.5e, TSP
Kattis - bilateral 8.4c, NP-hard/C, special, Easier
Kattis - bookclub 4.8e, Bipartite Graph
Kattis - bustour 3.5e, TSP
Kattis - canonical 3.5d, Coin-Change
Kattis - coloring 8.4b, NP-hard/C, small, Harder
Kattis - cycleseasy 3.5e, TSP
Kattis - elementarymath 4.8e, Bipartite Graph
Kattis - engaging 9.kuhn, Kuhn Munkres's Algorithm
Kattis - equalsumseasy 8.4a, NP-hard/C, small, Easier
Kattis - errands 3.5e, TSP
Kattis - escapeplan 4.8e, Bipartite Graph
Kattis - europeantrip 8.4c, NP-hard/C, special, Easier
Kattis - exactchange2 3.5d, Coin-Change
Kattis - flowfree 8.4a, NP-hard/C, small, Easier
Kattis - font 8.4a, NP-hard/C, small, Easier
Kattis - jailbreak 8.4d, NP-hard/C, special, Harder
Kattis - knapsack 3.5c, 0-1 Knapsack
Kattis - maxflow 4.6a, Network Flow, Standard
Kattis - maximizingyourpay 3.5e, TSP
Kattis - maximumrent 9.line, Linear Programming
Kattis - mazemovement 4.6a, Network Flow, Standard
Kattis - mincut 4.6a, Network Flow, Standard
Kattis - ninepacks 3.5c, 0-1 Knapsack
Kattis - onemorecc 3.5d, Coin-Change
Kattis - orders 3.5c, 0-1 Knapsack
Kattis - pokemongogo 3.5e, TSP
Kattis - presidentialelections 3.5c, 0-1 Knapsack
Kattis - programmingteamselection 8.4b, NP-hard/C, small, Harder
Kattis - reactivity 8.4c, NP-hard/C, special, Easier
Kattis - ridofcoins 8.4d, NP-hard/C, special, Harder
Kattis - thekingofthenorth 4.6b, Network Flow, Variants
Kattis - transportation 4.6b, Network Flow, Variants
Kattis - wedding 8.4d, NP-hard/C, special, Harder