https://github.com/hieplpvip/cses-solutions
Solutions to CSES Problem Set
https://github.com/hieplpvip/cses-solutions
cses cses-solutions
Last synced: 8 months ago
JSON representation
Solutions to CSES Problem Set
- Host: GitHub
- URL: https://github.com/hieplpvip/cses-solutions
- Owner: hieplpvip
- Created: 2021-02-10T10:25:39.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-23T14:04:53.000Z (about 4 years ago)
- Last Synced: 2025-04-14T20:15:24.597Z (8 months ago)
- Topics: cses, cses-solutions
- Language: C++
- Homepage:
- Size: 257 KB
- Stars: 12
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CSES Solutions
My own solutions to the [CSES Problem Set](https://cses.fi/problemset/)
My account on CSES: https://cses.fi/user/15196
Feel free to ask (by creating issues) if you don't understand my solutions.
### Introductory Problems
| Name | Solution |
| -------------------------------------------------------------- | -------------------------- |
| [Weird Algorithm](https://cses.fi/problemset/task/1068/) | [1068.cpp](./cpp/1068.cpp) |
| [Missing Number](https://cses.fi/problemset/task/1083/) | [1083.cpp](./cpp/1083.cpp) |
| [Repetitions](https://cses.fi/problemset/task/1069/) | [1069.cpp](./cpp/1069.cpp) |
| [Increasing Array](https://cses.fi/problemset/task/1094/) | [1094.cpp](./cpp/1094.cpp) |
| [Permutations](https://cses.fi/problemset/task/1070/) | [1070.cpp](./cpp/1070.cpp) |
| [Number Spiral](https://cses.fi/problemset/task/1071/) | [1071.cpp](./cpp/1071.cpp) |
| [Two Knights](https://cses.fi/problemset/task/1072/) | [1072.cpp](./cpp/1072.cpp) |
| [Two Sets](https://cses.fi/problemset/task/1092/) | [1092.cpp](./cpp/1092.cpp) |
| [Bit Strings](https://cses.fi/problemset/task/1617/) | [1617.cpp](./cpp/1617.cpp) |
| [Trailing Zeros](https://cses.fi/problemset/task/1618/) | [1618.cpp](./cpp/1618.cpp) |
| [Coin Piles](https://cses.fi/problemset/task/1754/) | [1754.cpp](./cpp/1754.cpp) |
| [Palindrome Reorder](https://cses.fi/problemset/task/1755/) | [1755.cpp](./cpp/1755.cpp) |
| [Gray Code](https://cses.fi/problemset/task/2205/) | [2205.cpp](./cpp/2205.cpp) |
| [Tower of Hanoi](https://cses.fi/problemset/task/2165/) | [2165.cpp](./cpp/2165.cpp) |
| [Creating Strings](https://cses.fi/problemset/task/1622/) | [1622.cpp](./cpp/1622.cpp) |
| [Apple Division](https://cses.fi/problemset/task/1623/) | [1623.cpp](./cpp/1623.cpp) |
| [Chessboard and Queens](https://cses.fi/problemset/task/1624/) | [1624.cpp](./cpp/1624.cpp) |
| [Digit Queries](https://cses.fi/problemset/task/2431/) | [2431.cpp](./cpp/2431.cpp) |
| [Grid Paths](https://cses.fi/problemset/task/1625/) | [1625.cpp](./cpp/1625.cpp) |
### Sorting and Searching
| Name | Solution |
| ----------------------------------------------------------------- | -------------------------- |
| [Distinct Numbers](https://cses.fi/problemset/task/1621/) | [1621.cpp](./cpp/1621.cpp) |
| [Apartments](https://cses.fi/problemset/task/1084/) | [1084.cpp](./cpp/1084.cpp) |
| [Ferris Wheel](https://cses.fi/problemset/task/1090/) | [1090.cpp](./cpp/1090.cpp) |
| [Concert Tickets](https://cses.fi/problemset/task/1091/) | [1091.cpp](./cpp/1091.cpp) |
| [Restaurant Customers](https://cses.fi/problemset/task/1619/) | [1619.cpp](./cpp/1619.cpp) |
| [Movie Festival](https://cses.fi/problemset/task/1629/) | [1629.cpp](./cpp/1629.cpp) |
| [Sum of Two Values](https://cses.fi/problemset/task/1640/) | [1640.cpp](./cpp/1640.cpp) |
| [Maximum Subarray Sum](https://cses.fi/problemset/task/1643/) | [1643.cpp](./cpp/1643.cpp) |
| [Stick Lengths](https://cses.fi/problemset/task/1074/) | [1074.cpp](./cpp/1074.cpp) |
| [Missing Coin Sum](https://cses.fi/problemset/task/2183/) | [2183.cpp](./cpp/2183.cpp) |
| [Collecting Numbers](https://cses.fi/problemset/task/2216/) | [2216.cpp](./cpp/2216.cpp) |
| [Collecting Numbers II](https://cses.fi/problemset/task/2217/) | [2217.cpp](./cpp/2217.cpp) |
| [Playlist](https://cses.fi/problemset/task/1141/) | [1141.cpp](./cpp/1141.cpp) |
| [Towers](https://cses.fi/problemset/task/1073/) | [1073.cpp](./cpp/1073.cpp) |
| [Traffic Lights](https://cses.fi/problemset/task/1163/) | [1163.cpp](./cpp/1163.cpp) |
| [Josephus Problem I](https://cses.fi/problemset/task/2162/) | [2162.cpp](./cpp/2162.cpp) |
| [Josephus Problem II](https://cses.fi/problemset/task/2163/) | [2163.cpp](./cpp/2163.cpp) |
| [Nested Ranges Check](https://cses.fi/problemset/task/2168/) | [2168.cpp](./cpp/2168.cpp) |
| [Nested Ranges Count](https://cses.fi/problemset/task/2169/) | [2169.cpp](./cpp/2169.cpp) |
| [Room Allocation](https://cses.fi/problemset/task/1164/) | [1164.cpp](./cpp/1164.cpp) |
| [Factory Machines](https://cses.fi/problemset/task/1620/) | [1620.cpp](./cpp/1620.cpp) |
| [Tasks and Deadlines](https://cses.fi/problemset/task/1630/) | [1630.cpp](./cpp/1630.cpp) |
| [Reading Books](https://cses.fi/problemset/task/1631/) | [1631.cpp](./cpp/1631.cpp) |
| [Sum of Three Values](https://cses.fi/problemset/task/1641/) | [1641.cpp](./cpp/1641.cpp) |
| [Sum of Four Values](https://cses.fi/problemset/task/1642/) | [1642.cpp](./cpp/1642.cpp) |
| [Nearest Smaller Values](https://cses.fi/problemset/task/1645/) | [1645.cpp](./cpp/1645.cpp) |
| [Subarray Sums I](https://cses.fi/problemset/task/1660/) | [1660.cpp](./cpp/1660.cpp) |
| [Subarray Sums II](https://cses.fi/problemset/task/1661/) | [1661.cpp](./cpp/1661.cpp) |
| [Subarray Divisibility](https://cses.fi/problemset/task/1662/) | [1662.cpp](./cpp/1662.cpp) |
| [Subarray Distinct Values](https://cses.fi/problemset/task/2428/) | [2428.cpp](./cpp/2428.cpp) |
| [Array Division](https://cses.fi/problemset/task/1085/) | [1085.cpp](./cpp/1085.cpp) |
| [Sliding Median](https://cses.fi/problemset/task/1076/) | [1076.cpp](./cpp/1076.cpp) |
| [Sliding Cost](https://cses.fi/problemset/task/1077/) | [1077.cpp](./cpp/1077.cpp) |
| [Movie Festival II](https://cses.fi/problemset/task/1632/) | [1632.cpp](./cpp/1632.cpp) |
| [Maximum Subarray Sum II](https://cses.fi/problemset/task/1644/) | [1644.cpp](./cpp/1644.cpp) |
### Dynamic Programming
| Name | Solution |
| --------------------------------------------------------------- | -------------------------- |
| [Dice Combinations](https://cses.fi/problemset/task/1633/) | [1633.cpp](./cpp/1633.cpp) |
| [Minimizing Coins](https://cses.fi/problemset/task/1634/) | [1634.cpp](./cpp/1634.cpp) |
| [Coin Combinations I](https://cses.fi/problemset/task/1635/) | [1635.cpp](./cpp/1635.cpp) |
| [Coin Combinations II](https://cses.fi/problemset/task/1636/) | [1636.cpp](./cpp/1636.cpp) |
| [Removing Digits](https://cses.fi/problemset/task/1637/) | [1637.cpp](./cpp/1637.cpp) |
| [Grid Paths](https://cses.fi/problemset/task/1638/) | [1638.cpp](./cpp/1638.cpp) |
| [Book Shop](https://cses.fi/problemset/task/1158/) | [1158.cpp](./cpp/1158.cpp) |
| [Array Description](https://cses.fi/problemset/task/1746/) | [1746.cpp](./cpp/1746.cpp) |
| [Counting Towers](https://cses.fi/problemset/task/2413/) | [2413.cpp](./cpp/2413.cpp) |
| [Edit Distance](https://cses.fi/problemset/task/1639/) | [1639.cpp](./cpp/1639.cpp) |
| [Rectangle Cutting](https://cses.fi/problemset/task/1744/) | [1744.cpp](./cpp/1744.cpp) |
| [Money Sums](https://cses.fi/problemset/task/1745/) | [1745.cpp](./cpp/1745.cpp) |
| [Removal Game](https://cses.fi/problemset/task/1097/) | [1097.cpp](./cpp/1097.cpp) |
| [Two Sets II](https://cses.fi/problemset/task/1093/) | [1093.cpp](./cpp/1093.cpp) |
| [Increasing Subsequence](https://cses.fi/problemset/task/1145/) | [1145.cpp](./cpp/1145.cpp) |
| [Projects](https://cses.fi/problemset/task/1140/) | [1140.cpp](./cpp/1140.cpp) |
| [Elevator Rides](https://cses.fi/problemset/task/1653/) | [1653.cpp](./cpp/1653.cpp) |
| [Counting Tilings](https://cses.fi/problemset/task/2181/) | [2181.cpp](./cpp/2181.cpp) |
| [Counting Numbers](https://cses.fi/problemset/task/2220/) | [2220.cpp](./cpp/2220.cpp) |
### Graph Algorithms
| Name | Solution |
| ------------------------------------------------------------- | -------------------------- |
| [Counting Rooms](https://cses.fi/problemset/task/1192/) | [1192.cpp](./cpp/1192.cpp) |
| [Labyrinth](https://cses.fi/problemset/task/1193/) | [1193.cpp](./cpp/1193.cpp) |
| [Building Roads](https://cses.fi/problemset/task/1666/) | [1666.cpp](./cpp/1666.cpp) |
| [Message Route](https://cses.fi/problemset/task/1667/) | [1667.cpp](./cpp/1667.cpp) |
| [Building Teams](https://cses.fi/problemset/task/1668/) | [1668.cpp](./cpp/1668.cpp) |
| [Round Trip](https://cses.fi/problemset/task/1669/) | [1669.cpp](./cpp/1669.cpp) |
| [Monsters](https://cses.fi/problemset/task/1194/) | [1194.cpp](./cpp/1194.cpp) |
| [Shortest Routes I](https://cses.fi/problemset/task/1671/) | [1671.cpp](./cpp/1671.cpp) |
| [Shortest Routes II](https://cses.fi/problemset/task/1672/) | [1672.cpp](./cpp/1672.cpp) |
| [High Score](https://cses.fi/problemset/task/1673/) | [1673.cpp](./cpp/1673.cpp) |
| [Flight Discount](https://cses.fi/problemset/task/1195/) | [1195.cpp](./cpp/1195.cpp) |
| [Cycle Finding](https://cses.fi/problemset/task/1197/) | [1197.cpp](./cpp/1197.cpp) |
| [Flight Routes](https://cses.fi/problemset/task/1196/) | [1196.cpp](./cpp/1196.cpp) |
| [Round Trip II](https://cses.fi/problemset/task/1678/) | [1678.cpp](./cpp/1678.cpp) |
| [Course Schedule](https://cses.fi/problemset/task/1679/) | [1679.cpp](./cpp/1679.cpp) |
| [Longest Flight Route](https://cses.fi/problemset/task/1680/) | [1680.cpp](./cpp/1680.cpp) |
| [Game Routes](https://cses.fi/problemset/task/1681/) | [1681.cpp](./cpp/1681.cpp) |
| [Investigation](https://cses.fi/problemset/task/1202/) | [1202.cpp](./cpp/1202.cpp) |
| [Planets Queries I](https://cses.fi/problemset/task/1750/) | [1750.cpp](./cpp/1750.cpp) |
| [Planets Queries II](https://cses.fi/problemset/task/1160/) | [1160.cpp](./cpp/1160.cpp) |
| [Planets Cycles](https://cses.fi/problemset/task/1751/) | [1751.cpp](./cpp/1751.cpp) |
| [Road Reparation](https://cses.fi/problemset/task/1675/) | [1675.cpp](./cpp/1675.cpp) |
| [Road Construction](https://cses.fi/problemset/task/1676/) | [1676.cpp](./cpp/1676.cpp) |
| [Flight Routes Check](https://cses.fi/problemset/task/1682/) | [1682.cpp](./cpp/1682.cpp) |
| [Planets and Kingdoms](https://cses.fi/problemset/task/1683/) | [1683.cpp](./cpp/1683.cpp) |
| [Giant Pizza](https://cses.fi/problemset/task/1684/) | [1684.cpp](./cpp/1684.cpp) |
| [Coin Collector](https://cses.fi/problemset/task/1686/) | [1686.cpp](./cpp/1686.cpp) |
| [Mail Delivery](https://cses.fi/problemset/task/1691/) | [1691.cpp](./cpp/1691.cpp) |
| [De Bruijn Sequence](https://cses.fi/problemset/task/1692/) | [1692.cpp](./cpp/1692.cpp) |
| [Teleporters Path](https://cses.fi/problemset/task/1693/) | [1693.cpp](./cpp/1693.cpp) |
| [Hamiltonian Flights](https://cses.fi/problemset/task/1690/) | [1690.cpp](./cpp/1690.cpp) |
| [Knight's Tour](https://cses.fi/problemset/task/1689/) | [1689.cpp](./cpp/1689.cpp) |
| [Download Speed](https://cses.fi/problemset/task/1694/) | [1694.cpp](./cpp/1694.cpp) |
| [Police Chase](https://cses.fi/problemset/task/1695/) | [1695.cpp](./cpp/1695.cpp) |
| [School Dance](https://cses.fi/problemset/task/1696/) | [1696.cpp](./cpp/1696.cpp) |
| [Distinct Routes](https://cses.fi/problemset/task/1711/) | [1711.cpp](./cpp/1711.cpp) |
### Range Queries
| Name | Solution |
| ---------------------------------------------------------------------- | -------------------------- |
| [Static Range Sum Queries](https://cses.fi/problemset/task/1646/) | [1646.cpp](./cpp/1646.cpp) |
| [Static Range Minimum Queries](https://cses.fi/problemset/task/1647/) | [1647.cpp](./cpp/1647.cpp) |
| [Dynamic Range Sum Queries](https://cses.fi/problemset/task/1648/) | [1648.cpp](./cpp/1648.cpp) |
| [Dynamic Range Minimum Queries](https://cses.fi/problemset/task/1649/) | [1649.cpp](./cpp/1649.cpp) |
| [Range Xor Queries](https://cses.fi/problemset/task/1650/) | [1650.cpp](./cpp/1650.cpp) |
| [Range Update Queries](https://cses.fi/problemset/task/1651/) | [1651.cpp](./cpp/1651.cpp) |
| [Forest Queries](https://cses.fi/problemset/task/1652/) | [1652.cpp](./cpp/1652.cpp) |
| [Hotel Queries](https://cses.fi/problemset/task/1143/) | [1143.cpp](./cpp/1143.cpp) |
| [List Removals](https://cses.fi/problemset/task/1749/) | [1749.cpp](./cpp/1749.cpp) |
| [Salary Queries](https://cses.fi/problemset/task/1144/) | [1144.cpp](./cpp/1144.cpp) |
| [Prefix Sum Queries](https://cses.fi/problemset/task/2166/) | [2166.cpp](./cpp/2166.cpp) |
| [Pizzeria Queries](https://cses.fi/problemset/task/2206/) | [2206.cpp](./cpp/2206.cpp) |
| [Subarray Sum Queries](https://cses.fi/problemset/task/1190/) | [1190.cpp](./cpp/1190.cpp) |
| [Distinct Values Queries](https://cses.fi/problemset/task/1734/) | [1734.cpp](./cpp/1734.cpp) |
| [Increasing Array Queries](https://cses.fi/problemset/task/2416/) | [2416.cpp](./cpp/2416.cpp) |
| [Forest Queries II](https://cses.fi/problemset/task/1739/) | [1739.cpp](./cpp/1739.cpp) |
| [Range Updates and Sums](https://cses.fi/problemset/task/1735/) | [1735.cpp](./cpp/1735.cpp) |
| [Polynomial Queries](https://cses.fi/problemset/task/1736/) | [1736.cpp](./cpp/1736.cpp) |
| [Range Queries and Copies](https://cses.fi/problemset/task/1737/) | [1737.cpp](./cpp/1737.cpp) |
### Tree Algorithms
| Name | Solution |
| -------------------------------------------------------------- | -------------------------- |
| [Subordinates](https://cses.fi/problemset/task/1674/) | [1674.cpp](./cpp/1674.cpp) |
| [Tree Matching](https://cses.fi/problemset/task/1130/) | [1130.cpp](./cpp/1130.cpp) |
| [Tree Diameter](https://cses.fi/problemset/task/1131/) | [1131.cpp](./cpp/1131.cpp) |
| [Tree Distances I](https://cses.fi/problemset/task/1132/) | [1132.cpp](./cpp/1132.cpp) |
| [Tree Distances II](https://cses.fi/problemset/task/1133/) | [1133.cpp](./cpp/1133.cpp) |
| [Company Queries I](https://cses.fi/problemset/task/1687/) | [1687.cpp](./cpp/1687.cpp) |
| [Company Queries II](https://cses.fi/problemset/task/1688/) | [1688.cpp](./cpp/1688.cpp) |
| [Distance Queries](https://cses.fi/problemset/task/1135/) | [1135.cpp](./cpp/1135.cpp) |
| [Counting Paths](https://cses.fi/problemset/task/1136/) | [1136.cpp](./cpp/1136.cpp) |
| [Subtree Queries](https://cses.fi/problemset/task/1137/) | [1137.cpp](./cpp/1137.cpp) |
| [Path Queries](https://cses.fi/problemset/task/1138/) | [1138.cpp](./cpp/1138.cpp) |
| [Path Queries II](https://cses.fi/problemset/task/2134/) | [2134.cpp](./cpp/2134.cpp) |
| [Distinct Colors](https://cses.fi/problemset/task/1139/) | [1139.cpp](./cpp/1139.cpp) |
| [Finding a Centroid](https://cses.fi/problemset/task/2079/) | [2079.cpp](./cpp/2079.cpp) |
| [Fixed-Length Paths I](https://cses.fi/problemset/task/2080/) | [2080.cpp](./cpp/2080.cpp) |
| [Fixed-Length Paths II](https://cses.fi/problemset/task/2081/) | [2081.cpp](./cpp/2081.cpp) |
### Mathematics
| Name | Solution |
| --------------------------------------------------------------- | -------------------------- |
| [Josephus Queries](https://cses.fi/problemset/task/2164/) | [2164.cpp](./cpp/2164.cpp) |
| [Exponentiation](https://cses.fi/problemset/task/1095/) | [1095.cpp](./cpp/1095.cpp) |
| [Exponentiation II](https://cses.fi/problemset/task/1712/) | [1712.cpp](./cpp/1712.cpp) |
| [Counting Divisors](https://cses.fi/problemset/task/1713/) | [1713.cpp](./cpp/1713.cpp) |
| [Common Divisors](https://cses.fi/problemset/task/1081/) | [1081.cpp](./cpp/1081.cpp) |
| [Sum of Divisors](https://cses.fi/problemset/task/1082/) | [1082.cpp](./cpp/1082.cpp) |
| [Divisor Analysis](https://cses.fi/problemset/task/2182/) | [2182.cpp](./cpp/2182.cpp) |
| [Prime Multiples](https://cses.fi/problemset/task/2185/) | [2185.cpp](./cpp/2185.cpp) |
| [Counting Coprime Pairs](https://cses.fi/problemset/task/2417/) | [2417.cpp](./cpp/2417.cpp) |
| [Binomial Coefficients](https://cses.fi/problemset/task/1079/) | [1079.cpp](./cpp/1079.cpp) |
| [Creating Strings II](https://cses.fi/problemset/task/1715/) | [1715.cpp](./cpp/1715.cpp) |
| [Distributing Apples](https://cses.fi/problemset/task/1716/) | [1716.cpp](./cpp/1716.cpp) |
| [Christmas Party](https://cses.fi/problemset/task/1717/) | [1717.cpp](./cpp/1717.cpp) |
| [Bracket Sequences I](https://cses.fi/problemset/task/2064/) | [2064.cpp](./cpp/2064.cpp) |
| [Bracket Sequences II](https://cses.fi/problemset/task/2187/) | [2187.cpp](./cpp/2187.cpp) |
| [Counting Necklaces](https://cses.fi/problemset/task/2209/) | [2209.cpp](./cpp/2209.cpp) |
| [Counting Grids](https://cses.fi/problemset/task/2210/) | [2210.cpp](./cpp/2210.cpp) |
| [Fibonacci Numbers](https://cses.fi/problemset/task/1722/) | [1722.cpp](./cpp/1722.cpp) |
| [Throwing Dice](https://cses.fi/problemset/task/1096/) | [1096.cpp](./cpp/1096.cpp) |
| [Graph Paths I](https://cses.fi/problemset/task/1723/) | [1723.cpp](./cpp/1723.cpp) |
| [Graph Paths II](https://cses.fi/problemset/task/1724/) | [1724.cpp](./cpp/1724.cpp) |
| [Dice Probability](https://cses.fi/problemset/task/1725/) | [1725.cpp](./cpp/1725.cpp) |
| [Moving Robots](https://cses.fi/problemset/task/1726/) | [1726.cpp](./cpp/1726.cpp) |
| [Candy Lottery](https://cses.fi/problemset/task/1727/) | [1727.cpp](./cpp/1727.cpp) |
| [Inversion Probability](https://cses.fi/problemset/task/1728/) | [1728.cpp](./cpp/1728.cpp) |
| [Stick Game](https://cses.fi/problemset/task/1729/) | [1729.cpp](./cpp/1729.cpp) |
| [Nim Game I](https://cses.fi/problemset/task/1730/) | [1730.cpp](./cpp/1730.cpp) |
| [Nim Game II](https://cses.fi/problemset/task/1098/) | [1098.cpp](./cpp/1098.cpp) |
| [Stair Game](https://cses.fi/problemset/task/1099/) | [1099.cpp](./cpp/1099.cpp) |
| [Grundy's Game](https://cses.fi/problemset/task/2207/) | [2207.cpp](./cpp/2207.cpp) |
| [Another Game](https://cses.fi/problemset/task/2208/) | [2208.cpp](./cpp/2208.cpp) |
### String Algorithms
| Name | Solution |
| --------------------------------------------------------------- | -------------------------- |
| [Word Combinations](https://cses.fi/problemset/task/1731/) | [1731.cpp](./cpp/1731.cpp) |
| [String Matching](https://cses.fi/problemset/task/1753/) | [1753.cpp](./cpp/1753.cpp) |
| [Finding Borders](https://cses.fi/problemset/task/1732/) | [1732.cpp](./cpp/1732.cpp) |
| [Finding Periods](https://cses.fi/problemset/task/1733/) | [1733.cpp](./cpp/1733.cpp) |
| [Minimal Rotation](https://cses.fi/problemset/task/1110/) | [1110.cpp](./cpp/1110.cpp) |
| [Longest Palindrome](https://cses.fi/problemset/task/1111/) | [1111.cpp](./cpp/1111.cpp) |
| [Required Substring](https://cses.fi/problemset/task/1112/) | [1112.cpp](./cpp/1112.cpp) |
| [Palindrome Queries](https://cses.fi/problemset/task/2420/) | [2420.cpp](./cpp/2420.cpp) |
| [Finding Patterns](https://cses.fi/problemset/task/2102/) | [2102.cpp](./cpp/2102.cpp) |
| [Counting Patterns](https://cses.fi/problemset/task/2103/) | [2103.cpp](./cpp/2103.cpp) |
| [Pattern Positions](https://cses.fi/problemset/task/2104/) | [2104.cpp](./cpp/2104.cpp) |
| [Distinct Substrings](https://cses.fi/problemset/task/2105/) | [2105.cpp](./cpp/2105.cpp) |
| [Repeating Substring](https://cses.fi/problemset/task/2106/) | [2106.cpp](./cpp/2106.cpp) |
| [String Functions](https://cses.fi/problemset/task/2107/) | [2107.cpp](./cpp/2107.cpp) |
| [Substring Order I](https://cses.fi/problemset/task/2108/) | [2108.cpp](./cpp/2108.cpp) |
| [Substring Order II](https://cses.fi/problemset/task/2109/) | [2109.cpp](./cpp/2109.cpp) |
| [Substring Distribution](https://cses.fi/problemset/task/2110/) | [2110.cpp](./cpp/2110.cpp) |
### Geometry
| Name | Solution |
| ------------------------------------------------------------------- | -------------------------- |
| [Point Location Test](https://cses.fi/problemset/task/2189/) | [2189.cpp](./cpp/2189.cpp) |
| [Line Segment Intersection](https://cses.fi/problemset/task/2190/) | [2190.cpp](./cpp/2190.cpp) |
| [Polygon Area](https://cses.fi/problemset/task/2191/) | [2191.cpp](./cpp/2191.cpp) |
| [Point in Polygon](https://cses.fi/problemset/task/2192/) | [2192.cpp](./cpp/2192.cpp) |
| [Polygon Lattice Points](https://cses.fi/problemset/task/2193/) | [2193.cpp](./cpp/2193.cpp) |
| [Minimum Euclidean Distance](https://cses.fi/problemset/task/2194/) | [2194.cpp](./cpp/2194.cpp) |
| [Convex Hull](https://cses.fi/problemset/task/2195/) | [2195.cpp](./cpp/2195.cpp) |
### Advanced Techniques
| Name | Solution |
| ------------------------------------------------------------- | -------------------------- |
| [Meet in the Middle](https://cses.fi/problemset/task/1628/) | [1628.cpp](./cpp/1628.cpp) |
| [Hamming Distance](https://cses.fi/problemset/task/2136/) | [2136.cpp](./cpp/2136.cpp) |
| [Beautiful Subgrids](https://cses.fi/problemset/task/2137/) | [2137.cpp](./cpp/2137.cpp) |
| [Reachable Nodes](https://cses.fi/problemset/task/2138/) | [2138.cpp](./cpp/2138.cpp) |
| [Reachability Queries](https://cses.fi/problemset/task/2143/) | [2143.cpp](./cpp/2143.cpp) |
| [Cut and Paste](https://cses.fi/problemset/task/2072/) | |
| [Substring Reversals](https://cses.fi/problemset/task/2073/) | |
| [Reversals and Sums](https://cses.fi/problemset/task/2074/) | |
| [Necessary Roads](https://cses.fi/problemset/task/2076/) | [2076.cpp](./cpp/2076.cpp) |
| [Necessary Cities](https://cses.fi/problemset/task/2077/) | [2077.cpp](./cpp/2077.cpp) |
| [Eulerian Subgraphs](https://cses.fi/problemset/task/2078/) | [2078.cpp](./cpp/2078.cpp) |
| [Monster Game I](https://cses.fi/problemset/task/2084/) | [2084.cpp](./cpp/2084.cpp) |
| [Monster Game II](https://cses.fi/problemset/task/2085/) | [2085.cpp](./cpp/2085.cpp) |
| [Subarray Squares](https://cses.fi/problemset/task/2086/) | [2086.cpp](./cpp/2086.cpp) |
| [Houses and Schools](https://cses.fi/problemset/task/2087/) | [2087.cpp](./cpp/2087.cpp) |
| [Knuth Division](https://cses.fi/problemset/task/2088/) | [2088.cpp](./cpp/2088.cpp) |
| [Apples and Bananas](https://cses.fi/problemset/task/2111/) | [2111.cpp](./cpp/2111.cpp) |
| [One Bit Positions](https://cses.fi/problemset/task/2112/) | [2112.cpp](./cpp/2112.cpp) |
| [Signal Processing](https://cses.fi/problemset/task/2113/) | [2113.cpp](./cpp/2113.cpp) |
| [New Roads Queries](https://cses.fi/problemset/task/2101/) | [2101.cpp](./cpp/2101.cpp) |
| [Dynamic Connectivity](https://cses.fi/problemset/task/2133/) | [2133.cpp](./cpp/2133.cpp) |
| [Parcel Delivery](https://cses.fi/problemset/task/2121/) | [2121.cpp](./cpp/2121.cpp) |
| [Task Assignment](https://cses.fi/problemset/task/2129/) | [2129.cpp](./cpp/2129.cpp) |
| [Distinct Routes II](https://cses.fi/problemset/task/2130/) | [2130.cpp](./cpp/2130.cpp) |
### Additional Problems
| Name | Solution |
| ---------------------------------------------------------------------- | -------------------------- |
| [Shortest Subsequence](https://cses.fi/problemset/task/1087/) | [1087.cpp](./cpp/1087.cpp) |
| [Counting Bits](https://cses.fi/problemset/task/1146/) | [1146.cpp](./cpp/1146.cpp) |
| [Swap Game](https://cses.fi/problemset/task/1670/) | [1670.cpp](./cpp/1670.cpp) |
| [Prüfer Code](https://cses.fi/problemset/task/1134/) | [1134.cpp](./cpp/1134.cpp) |
| [Acyclic Graph Edges](https://cses.fi/problemset/task/1756/) | [1756.cpp](./cpp/1756.cpp) |
| [Strongly Connected Edges](https://cses.fi/problemset/task/2177/) | [2177.cpp](./cpp/2177.cpp) |
| [Even Outdegree Edges](https://cses.fi/problemset/task/2179/) | [2179.cpp](./cpp/2179.cpp) |
| [Multiplication Table](https://cses.fi/problemset/task/2422/) | [2422.cpp](./cpp/2422.cpp) |
| [Advertisement](https://cses.fi/problemset/task/1142/) | [1142.cpp](./cpp/1142.cpp) |
| [Special Substrings](https://cses.fi/problemset/task/2186/) | [2186.cpp](./cpp/2186.cpp) |
| [Permutation Inversions](https://cses.fi/problemset/task/2229/) | [2229.cpp](./cpp/2229.cpp) |
| [Maximum Xor Subarray](https://cses.fi/problemset/task/1655/) | [1655.cpp](./cpp/1655.cpp) |
| [Movie Festival Queries](https://cses.fi/problemset/task/1664/) | [1664.cpp](./cpp/1664.cpp) |
| [Chess Tournament](https://cses.fi/problemset/task/1697/) | [1697.cpp](./cpp/1697.cpp) |
| [Tree Traversals](https://cses.fi/problemset/task/1702/) | [1702.cpp](./cpp/1702.cpp) |
| [Network Renovation](https://cses.fi/problemset/task/1704/) | |
| [Graph Girth](https://cses.fi/problemset/task/1707/) | |
| [Intersection Points](https://cses.fi/problemset/task/1740/) | [1740.cpp](./cpp/1740.cpp) |
| [Inverse Inversions](https://cses.fi/problemset/task/2214/) | [2214.cpp](./cpp/2214.cpp) |
| [Monotone Subsequences](https://cses.fi/problemset/task/2215/) | |
| [String Reorder](https://cses.fi/problemset/task/1743/) | [1743.cpp](./cpp/1743.cpp) |
| [Stack Weights](https://cses.fi/problemset/task/2425/) | [2425.cpp](./cpp/2425.cpp) |
| [Pyramid Array](https://cses.fi/problemset/task/1747/) | [1747.cpp](./cpp/1747.cpp) |
| [Increasing Subsequence II](https://cses.fi/problemset/task/1748/) | [1748.cpp](./cpp/1748.cpp) |
| [String Removals](https://cses.fi/problemset/task/1149/) | [1149.cpp](./cpp/1149.cpp) |
| [Bit Inversions](https://cses.fi/problemset/task/1188/) | [1188.cpp](./cpp/1188.cpp) |
| [Xor Pyramid](https://cses.fi/problemset/task/2419/) | [2419.cpp](./cpp/2419.cpp) |
| [Writing Numbers](https://cses.fi/problemset/task/1086/) | [1086.cpp](./cpp/1086.cpp) |
| [String Transform](https://cses.fi/problemset/task/1113/) | [1113.cpp](./cpp/1113.cpp) |
| [Letter Pair Move Game](https://cses.fi/problemset/task/2427/) | |
| [Maximum Building I](https://cses.fi/problemset/task/1147/) | [1147.cpp](./cpp/1147.cpp) |
| [Sorting Methods](https://cses.fi/problemset/task/1162/) | [1162.cpp](./cpp/1162.cpp) |
| [Cyclic Array](https://cses.fi/problemset/task/1191/) | [1191.cpp](./cpp/1191.cpp) |
| [List of Sums](https://cses.fi/problemset/task/2414/) | [2414.cpp](./cpp/2414.cpp) |
| [Increasing Array II](https://cses.fi/problemset/task/2132/) | |
| [Food Division](https://cses.fi/problemset/task/1189/) | |
| [Bit Problem](https://cses.fi/problemset/task/1654/) | [1654.cpp](./cpp/1654.cpp) |
| [Swap Round Sorting](https://cses.fi/problemset/task/1698/) | [1698.cpp](./cpp/1698.cpp) |
| [Binary Subsequences](https://cses.fi/problemset/task/2430/) | |
| [Tree Isomorphism I](https://cses.fi/problemset/task/1700/) | [1700.cpp](./cpp/1700.cpp) |
| [Counting Sequences](https://cses.fi/problemset/task/2228/) | [2228.cpp](./cpp/2228.cpp) |
| [Critical Cities](https://cses.fi/problemset/task/1703/) | |
| [School Excursion](https://cses.fi/problemset/task/1706/) | [1706.cpp](./cpp/1706.cpp) |
| [Coin Grid](https://cses.fi/problemset/task/1709/) | [1709.cpp](./cpp/1709.cpp) |
| [Robot Path](https://cses.fi/problemset/task/1742/) | |
| [Programmers and Artists](https://cses.fi/problemset/task/2426/) | |
| [Course Schedule II](https://cses.fi/problemset/task/1757/) | [1757.cpp](./cpp/1757.cpp) |
| [Removing Digits II](https://cses.fi/problemset/task/2174/) | |
| [Coin Arrangement](https://cses.fi/problemset/task/2180/) | |
| [Counting Bishops](https://cses.fi/problemset/task/2176/) | [2176.cpp](./cpp/2176.cpp) |
| [Grid Puzzle I](https://cses.fi/problemset/task/2432/) | [2432.cpp](./cpp/2432.cpp) |
| [Grid Puzzle II](https://cses.fi/problemset/task/2131/) | [2131.cpp](./cpp/2131.cpp) |
| [Empty String](https://cses.fi/problemset/task/1080/) | [1080.cpp](./cpp/1080.cpp) |
| [Grid Paths](https://cses.fi/problemset/task/1078/) | [1078.cpp](./cpp/1078.cpp) |
| [Bit Substrings](https://cses.fi/problemset/task/2115/) | |
| [Reversal Sorting](https://cses.fi/problemset/task/2075/) | |
| [Counting Reorders](https://cses.fi/problemset/task/2421/) | |
| [Book Shop II](https://cses.fi/problemset/task/1159/) | [1159.cpp](./cpp/1159.cpp) |
| [Network Breakdown](https://cses.fi/problemset/task/1677/) | [1677.cpp](./cpp/1677.cpp) |
| [Visiting Cities](https://cses.fi/problemset/task/1203/) | |
| [Missing Coin Sum Queries](https://cses.fi/problemset/task/2184/) | |
| [Number Grid](https://cses.fi/problemset/task/1157/) | |
| [Maximum Building II](https://cses.fi/problemset/task/1148/) | [1148.cpp](./cpp/1148.cpp) |
| [Filling Trominos](https://cses.fi/problemset/task/2423/) | |
| [Stick Divisions](https://cses.fi/problemset/task/1161/) | [1161.cpp](./cpp/1161.cpp) |
| [Coding Company](https://cses.fi/problemset/task/1665/) | [1665.cpp](./cpp/1665.cpp) |
| [Flight Route Requests](https://cses.fi/problemset/task/1699/) | |
| [Two Stacks Sorting](https://cses.fi/problemset/task/2402/) | |
| [Tree Isomorphism II](https://cses.fi/problemset/task/1701/) | [1701.cpp](./cpp/1701.cpp) |
| [Forbidden Cities](https://cses.fi/problemset/task/1705/) | |
| [Area of Rectangles](https://cses.fi/problemset/task/1741/) | [1741.cpp](./cpp/1741.cpp) |
| [Grid Completion](https://cses.fi/problemset/task/2429/) | |
| [Creating Offices](https://cses.fi/problemset/task/1752/) | |
| [Permutations II](https://cses.fi/problemset/task/1075/) | |
| [Functional Graph Distribution](https://cses.fi/problemset/task/2415/) | |
| [New Flight Routes](https://cses.fi/problemset/task/1685/) | |
| [Grid Path Construction](https://cses.fi/problemset/task/2418/) | |