Index
Problems
180 problems cited across the book, each with the reason it was chosen. Difficulty labels follow the page that sets them: warm-up is a first read, core is the technique of the page, hard needs one more idea.
1Graphs and Models18chapter pages
CSES 1666Building RoadsCF 977ECyclic ComponentsSPOJ PT07YIs it a tree?CSES 1192Counting RoomsCSES 1666Building RoadsSPOJ PT07YIs it a tree?CF 1385EDirecting EdgesCF 915DAlmost Acyclic GraphCF 1354EGraph ColoringCF 566FClique in the Divisibility GraphCSES 2076Necessary RoadsCSES 1685New Flight RoutesCF 1000EWe Need More BossesCSES 1666Building RoadsCSES 1668Building TeamsSPOJ BUGLIFEBuggy… loveCF 1338BEdge Weight AssignmentCSES 2179Even Outdegree Edges
2Trees24chapter pages
SPOJ PT07ZLongest path in a treeCF 519EA and B and Lecture RoomsCSES 1674SubordinatesCSES 1132Tree Distances ICSES 1133Tree Distances IICF 700BConnecting UniversitiesCSES 1134Prüfer CodeCF 9DHow many trees?SPOJ HIGHWAYSCounting HighwaysCSES 1669Round TripCF 977ECyclic ComponentsCSES 1679Course ScheduleCF 459EPashmak and GraphCSES 1193LabyrinthCSES 1194MonstersCF 1242B0-1 MSTCSES 1670Swap GameCSES 1131Tree DiameterSPOJ PT07ZLongest path in a treeCF 1000EWe Need More BossesCSES 2079Finding a CentroidCSES 1137Subtree QueriesCSES 1674SubordinatesCF 339DXenia and Bit Operations
3Directed Graphs22chapter pages
CSES 1682Flight Routes CheckCF 1385EDirecting EdgesCSES 2179Even Outdegree EdgesCSES 1679Course ScheduleCSES 1681Game RoutesCSES 1680Longest Flight RouteCF 1385EDirecting EdgesCSES 1683Planets and KingdomsCF 427CCheckpostsCSES 1705Forbidden CitiesCSES 1682Flight Routes CheckCSES 1678Round Trip IICSES 1757Course Schedule IICF 977ECyclic ComponentsCSES 2138Reachable NodesCSES 1750Planets Queries ICSES 1751Planets CyclesCF 25DRoads not only in BerlandCSES 1730Nim Game ICSES 1729Stick GameCSES 2207Grundy's GameCSES 1099Stair Game
4Proof Toolkit4chapter pages
5Euler Tours and Hamilton Cycles11chapter pages
CSES 1691Mail DeliveryCSES 1693Teleporters PathCSES 2078Eulerian SubgraphsCSES 1691Mail DeliveryCSES 1693Teleporters PathCSES 1692De Bruijn SequenceCSES 2205Gray CodeCSES 1690Hamiltonian FlightsCSES 1136Counting PathsCSES 1689Knight's TourCSES 1624Chessboard and Queens
6Shortest Paths13chapter pages
CSES 1671Shortest Routes ICSES 1195Flight DiscountCF 459EPashmak and GraphCF 786BLegacyCSES 1197Cycle FindingCSES 1680Longest Flight RouteCSES 1672Shortest Routes IICSES 1672Shortest Routes IICSES 1705Forbidden CitiesCF 601AThe Two RoutesCF 1242B0-1 MSTCSES 1196Flight RoutesCSES 2121Parcel Delivery
7Matrices7chapter pages
CSES 2138Reachable NodesCSES 1134Prüfer CodeCSES 1136Counting PathsCSES 2181Counting TilingsSPOJ HIGHWAYSCounting HighwaysCSES 1134Prüfer CodeCSES 2181Counting Tilings
8Data Structures on Trees17chapter pages
CSES 1073TowersCSES 1631Reading BooksCSES 1666Building RoadsCF 25DRoads not only in BerlandCSES 1670Swap GameCSES 1734Distinct Values QueriesCSES 2169Nested Ranges CountCSES 1188Bit InversionsCSES 1648Dynamic Range Sum QueriesCSES 1649Dynamic Range Minimum QueriesCSES 1736Polynomial QueriesCF 242EXOR on SegmentCSES 1731Word CombinationsCSES 1753String MatchingCSES 2102Finding PatternsCSES 1647Static Range Minimum QueriesCSES 1137Subtree Queries
9Hardness and Escape Routes4chapter pages
CF 1198CMatching vs Independent SetCSES 2181Counting TilingsCSES 1690Hamiltonian FlightsCSES 1158Book Shop
10Lowest Common Ancestor8chapter pages
CSES 1687Company Queries ICSES 1688Company Queries IICSES 1135Distance QueriesCF 342EXenia and TreeCSES 2079Finding a CentroidCSES 1135Distance QueriesCSES 1136Counting PathsCSES 1137Subtree Queries
11Advanced Tree Algorithms16chapter pages
CSES 1666Building RoadsCF 160DEdges in MSTCF 600ELomsat gelralCSES 1137Subtree QueriesCSES 2079Finding a CentroidCF 342EXenia and TreeCSES 1133Tree Distances IISPOJ QTREEQuery on a treeCSES 1135Distance QueriesCSES 1137Subtree QueriesCSES 1700Tree Isomorphism ICSES 1701Tree Isomorphism IICSES 1674SubordinatesCSES 1631Reading BooksCSES 1073TowersCF 9DHow many trees?
12Cuts and Flows10chapter pages
CSES 1694Download SpeedCSES 1695Police ChaseCSES 1694Download SpeedCSES 1695Police ChaseCSES 1711Distinct RoutesCSES 2130Distinct Routes IICSES 1695Police ChaseCSES 2130Distinct Routes IICSES 2121Parcel DeliveryCSES 1694Download Speed
13Matching14chapter pages
CSES 1696School DanceCSES 1130Tree MatchingCSES 1696School DanceCSES 1130Tree MatchingCSES 1130Tree MatchingCSES 1696School DanceCSES 1696School DanceCSES 1130Tree MatchingCSES 2121Parcel DeliveryCSES 1631Reading BooksCSES 1696School DanceCSES 2181Counting TilingsCSES 1696School DanceCSES 1130Tree Matching