Skip to content
Permalink
main
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time

CSES Problem Set

This document contains a numbered list of all the problems from the CSES Problem Set. Two ordinal numbers are mentioned against each problem. The first number shows the position of the problem in the entire problem set. The second number shows the position of the problem within a section.

Problems

# Section Title Section # Problem Title and Link
001 of 300 Introductory Problems 01 of 19 Weird Algorithm
002 of 300 Introductory Problems 02 of 19 Missing Number
003 of 300 Introductory Problems 03 of 19 Repetitions
004 of 300 Introductory Problems 04 of 19 Increasing Array
005 of 300 Introductory Problems 05 of 19 Permutations
006 of 300 Introductory Problems 06 of 19 Number Spiral
007 of 300 Introductory Problems 07 of 19 Two Knights
008 of 300 Introductory Problems 08 of 19 Two Sets
009 of 300 Introductory Problems 09 of 19 Bit Strings
010 of 300 Introductory Problems 10 of 19 Trailing Zeros
011 of 300 Introductory Problems 11 of 19 Coin Piles
012 of 300 Introductory Problems 12 of 19 Palindrome Reorder
013 of 300 Introductory Problems 13 of 19 Gray Code
014 of 300 Introductory Problems 14 of 19 Tower of Hanoi
015 of 300 Introductory Problems 15 of 19 Creating Strings
016 of 300 Introductory Problems 16 of 19 Apple Division
017 of 300 Introductory Problems 17 of 19 Chessboard and Queens
018 of 300 Introductory Problems 18 of 19 Digit Queries
019 of 300 Introductory Problems 19 of 19 Grid Paths
020 of 300 Sorting and Searching 01 of 35 Distinct Numbers
021 of 300 Sorting and Searching 02 of 35 Apartments
022 of 300 Sorting and Searching 03 of 35 Ferris Wheel
023 of 300 Sorting and Searching 04 of 35 Concert Tickets
024 of 300 Sorting and Searching 05 of 35 Restaurant Customers
025 of 300 Sorting and Searching 06 of 35 Movie Festival
026 of 300 Sorting and Searching 07 of 35 Sum of Two Values
027 of 300 Sorting and Searching 08 of 35 Maximum Subarray Sum
028 of 300 Sorting and Searching 09 of 35 Stick Lengths
029 of 300 Sorting and Searching 10 of 35 Missing Coin Sum
030 of 300 Sorting and Searching 11 of 35 Collecting Numbers
031 of 300 Sorting and Searching 12 of 35 Collecting Numbers II
032 of 300 Sorting and Searching 13 of 35 Playlist
033 of 300 Sorting and Searching 14 of 35 Towers
034 of 300 Sorting and Searching 15 of 35 Traffic Lights
035 of 300 Sorting and Searching 16 of 35 Josephus Problem I
036 of 300 Sorting and Searching 17 of 35 Josephus Problem II
037 of 300 Sorting and Searching 18 of 35 Nested Ranges Check
038 of 300 Sorting and Searching 19 of 35 Nested Ranges Count
039 of 300 Sorting and Searching 20 of 35 Room Allocation
040 of 300 Sorting and Searching 21 of 35 Factory Machines
041 of 300 Sorting and Searching 22 of 35 Tasks and Deadlines
042 of 300 Sorting and Searching 23 of 35 Reading Books
043 of 300 Sorting and Searching 24 of 35 Sum of Three Values
044 of 300 Sorting and Searching 25 of 35 Sum of Four Values
045 of 300 Sorting and Searching 26 of 35 Nearest Smaller Values
046 of 300 Sorting and Searching 27 of 35 Subarray Sums I
047 of 300 Sorting and Searching 28 of 35 Subarray Sums II
048 of 300 Sorting and Searching 29 of 35 Subarray Divisibility
049 of 300 Sorting and Searching 30 of 35 Subarray Distinct Values
050 of 300 Sorting and Searching 31 of 35 Array Division
051 of 300 Sorting and Searching 32 of 35 Sliding Median
052 of 300 Sorting and Searching 33 of 35 Sliding Cost
053 of 300 Sorting and Searching 34 of 35 Movie Festival II
054 of 300 Sorting and Searching 35 of 35 Maximum Subarray Sum II
055 of 300 Dynamic Programming 01 of 19 Dice Combinations
056 of 300 Dynamic Programming 02 of 19 Minimizing Coins
057 of 300 Dynamic Programming 03 of 19 Coin Combinations I
058 of 300 Dynamic Programming 04 of 19 Coin Combinations II
059 of 300 Dynamic Programming 05 of 19 Removing Digits
060 of 300 Dynamic Programming 06 of 19 Grid Paths
061 of 300 Dynamic Programming 07 of 19 Book Shop
062 of 300 Dynamic Programming 08 of 19 Array Description
063 of 300 Dynamic Programming 09 of 19 Counting Towers
064 of 300 Dynamic Programming 10 of 19 Edit Distance
065 of 300 Dynamic Programming 11 of 19 Rectangle Cutting
066 of 300 Dynamic Programming 12 of 19 Money Sums
067 of 300 Dynamic Programming 13 of 19 Removal Game
068 of 300 Dynamic Programming 14 of 19 Two Sets II
069 of 300 Dynamic Programming 15 of 19 Increasing Subsequence
070 of 300 Dynamic Programming 16 of 19 Projects
071 of 300 Dynamic Programming 17 of 19 Elevator Rides
072 of 300 Dynamic Programming 18 of 19 Counting Tilings
073 of 300 Dynamic Programming 19 of 19 Counting Numbers
074 of 300 Graph Algorithms 01 of 36 Counting Rooms
075 of 300 Graph Algorithms 02 of 36 Labyrinth
076 of 300 Graph Algorithms 03 of 36 Building Roads
077 of 300 Graph Algorithms 04 of 36 Message Route
078 of 300 Graph Algorithms 05 of 36 Building Teams
079 of 300 Graph Algorithms 06 of 36 Round Trip
080 of 300 Graph Algorithms 07 of 36 Monsters
081 of 300 Graph Algorithms 08 of 36 Shortest Routes I
082 of 300 Graph Algorithms 09 of 36 Shortest Routes II
083 of 300 Graph Algorithms 10 of 36 High Score
084 of 300 Graph Algorithms 11 of 36 Flight Discount
085 of 300 Graph Algorithms 12 of 36 Cycle Finding
086 of 300 Graph Algorithms 13 of 36 Flight Routes
087 of 300 Graph Algorithms 14 of 36 Round Trip II
088 of 300 Graph Algorithms 15 of 36 Course Schedule
089 of 300 Graph Algorithms 16 of 36 Longest Flight Route
090 of 300 Graph Algorithms 17 of 36 Game Routes
091 of 300 Graph Algorithms 18 of 36 Investigation
092 of 300 Graph Algorithms 19 of 36 Planets Queries I
093 of 300 Graph Algorithms 20 of 36 Planets Queries II
094 of 300 Graph Algorithms 21 of 36 Planets Cycles
095 of 300 Graph Algorithms 22 of 36 Road Reparation
096 of 300 Graph Algorithms 23 of 36 Road Construction
097 of 300 Graph Algorithms 24 of 36 Flight Routes Check
098 of 300 Graph Algorithms 25 of 36 Planets and Kingdoms
099 of 300 Graph Algorithms 26 of 36 Giant Pizza
100 of 300 Graph Algorithms 27 of 36 Coin Collector
101 of 300 Graph Algorithms 28 of 36 Mail Delivery
102 of 300 Graph Algorithms 29 of 36 De Bruijn Sequence
103 of 300 Graph Algorithms 30 of 36 Teleporters Path
104 of 300 Graph Algorithms 31 of 36 Hamiltonian Flights
105 of 300 Graph Algorithms 32 of 36 Knight's Tour
106 of 300 Graph Algorithms 33 of 36 Download Speed
107 of 300 Graph Algorithms 34 of 36 Police Chase
108 of 300 Graph Algorithms 35 of 36 School Dance
109 of 300 Graph Algorithms 36 of 36 Distinct Routes
110 of 300 Range Queries 01 of 19 Static Range Sum Queries
111 of 300 Range Queries 02 of 19 Static Range Minimum Queries
112 of 300 Range Queries 03 of 19 Dynamic Range Sum Queries
113 of 300 Range Queries 04 of 19 Dynamic Range Minimum Queries
114 of 300 Range Queries 05 of 19 Range Xor Queries
115 of 300 Range Queries 06 of 19 Range Update Queries
116 of 300 Range Queries 07 of 19 Forest Queries
117 of 300 Range Queries 08 of 19 Hotel Queries
118 of 300 Range Queries 09 of 19 List Removals
119 of 300 Range Queries 10 of 19 Salary Queries
120 of 300 Range Queries 11 of 19 Prefix Sum Queries
121 of 300 Range Queries 12 of 19 Pizzeria Queries
122 of 300 Range Queries 13 of 19 Subarray Sum Queries
123 of 300 Range Queries 14 of 19 Distinct Values Queries
124 of 300 Range Queries 15 of 19 Increasing Array Queries
125 of 300 Range Queries 16 of 19 Forest Queries II
126 of 300 Range Queries 17 of 19 Range Updates and Sums
127 of 300 Range Queries 18 of 19 Polynomial Queries
128 of 300 Range Queries 19 of 19 Range Queries and Copies
129 of 300 Tree Algorithms 01 of 16 Subordinates
130 of 300 Tree Algorithms 02 of 16 Tree Matching
131 of 300 Tree Algorithms 03 of 16 Tree Diameter
132 of 300 Tree Algorithms 04 of 16 Tree Distances I
133 of 300 Tree Algorithms 05 of 16 Tree Distances II
134 of 300 Tree Algorithms 06 of 16 Company Queries I
135 of 300 Tree Algorithms 07 of 16 Company Queries II
136 of 300 Tree Algorithms 08 of 16 Distance Queries
137 of 300 Tree Algorithms 09 of 16 Counting Paths
138 of 300 Tree Algorithms 10 of 16 Subtree Queries
139 of 300 Tree Algorithms 11 of 16 Path Queries
140 of 300 Tree Algorithms 12 of 16 Path Queries II
141 of 300 Tree Algorithms 13 of 16 Distinct Colors
142 of 300 Tree Algorithms 14 of 16 Finding a Centroid
143 of 300 Tree Algorithms 15 of 16 Fixed-Length Paths I
144 of 300 Tree Algorithms 16 of 16 Fixed-Length Paths II
145 of 300 Mathematics 01 of 31 Josephus Queries
146 of 300 Mathematics 02 of 31 Exponentiation
147 of 300 Mathematics 03 of 31 Exponentiation II
148 of 300 Mathematics 04 of 31 Counting Divisors
149 of 300 Mathematics 05 of 31 Common Divisors
150 of 300 Mathematics 06 of 31 Sum of Divisors
151 of 300 Mathematics 07 of 31 Divisor Analysis
152 of 300 Mathematics 08 of 31 Prime Multiples
153 of 300 Mathematics 09 of 31 Counting Coprime Pairs
154 of 300 Mathematics 10 of 31 Binomial Coefficients
155 of 300 Mathematics 11 of 31 Creating Strings II
156 of 300 Mathematics 12 of 31 Distributing Apples
157 of 300 Mathematics 13 of 31 Christmas Party
158 of 300 Mathematics 14 of 31 Bracket Sequences I
159 of 300 Mathematics 15 of 31 Bracket Sequences II
160 of 300 Mathematics 16 of 31 Counting Necklaces
161 of 300 Mathematics 17 of 31 Counting Grids
162 of 300 Mathematics 18 of 31 Fibonacci Numbers
163 of 300 Mathematics 19 of 31 Throwing Dice
164 of 300 Mathematics 20 of 31 Graph Paths I
165 of 300 Mathematics 21 of 31 Graph Paths II
166 of 300 Mathematics 22 of 31 Dice Probability
167 of 300 Mathematics 23 of 31 Moving Robots
168 of 300 Mathematics 24 of 31 Candy Lottery
169 of 300 Mathematics 25 of 31 Inversion Probability
170 of 300 Mathematics 26 of 31 Stick Game
171 of 300 Mathematics 27 of 31 Nim Game I
172 of 300 Mathematics 28 of 31 Nim Game II
173 of 300 Mathematics 29 of 31 Stair Game
174 of 300 Mathematics 30 of 31 Grundy's Game
175 of 300 Mathematics 31 of 31 Another Game
176 of 300 String Algorithms 01 of 17 Word Combinations
177 of 300 String Algorithms 02 of 17 String Matching
178 of 300 String Algorithms 03 of 17 Finding Borders
179 of 300 String Algorithms 04 of 17 Finding Periods
180 of 300 String Algorithms 05 of 17 Minimal Rotation
181 of 300 String Algorithms 06 of 17 Longest Palindrome
182 of 300 String Algorithms 07 of 17 Required Substring
183 of 300 String Algorithms 08 of 17 Palindrome Queries
184 of 300 String Algorithms 09 of 17 Finding Patterns
185 of 300 String Algorithms 10 of 17 Counting Patterns
186 of 300 String Algorithms 11 of 17 Pattern Positions
187 of 300 String Algorithms 12 of 17 Distinct Substrings
188 of 300 String Algorithms 13 of 17 Repeating Substring
189 of 300 String Algorithms 14 of 17 String Functions
190 of 300 String Algorithms 15 of 17 Substring Order I
191 of 300 String Algorithms 16 of 17 Substring Order II
192 of 300 String Algorithms 17 of 17 Substring Distribution
193 of 300 Geometry 01 of 7 Point Location Test
194 of 300 Geometry 02 of 7 Line Segment Intersection
195 of 300 Geometry 03 of 7 Polygon Area
196 of 300 Geometry 04 of 7 Point in Polygon
197 of 300 Geometry 05 of 7 Polygon Lattice Points
198 of 300 Geometry 06 of 7 Minimum Euclidean Distance
199 of 300 Geometry 07 of 7 Convex Hull
200 of 300 Advanced Techniques 01 of 24 Meet in the Middle
201 of 300 Advanced Techniques 02 of 24 Hamming Distance
202 of 300 Advanced Techniques 03 of 24 Beautiful Subgrids
203 of 300 Advanced Techniques 04 of 24 Reachable Nodes
204 of 300 Advanced Techniques 05 of 24 Reachability Queries
205 of 300 Advanced Techniques 06 of 24 Cut and Paste
206 of 300 Advanced Techniques 07 of 24 Substring Reversals
207 of 300 Advanced Techniques 08 of 24 Reversals and Sums
208 of 300 Advanced Techniques 09 of 24 Necessary Roads
209 of 300 Advanced Techniques 10 of 24 Necessary Cities
210 of 300 Advanced Techniques 11 of 24 Eulerian Subgraphs
211 of 300 Advanced Techniques 12 of 24 Monster Game I
212 of 300 Advanced Techniques 13 of 24 Monster Game II
213 of 300 Advanced Techniques 14 of 24 Subarray Squares
214 of 300 Advanced Techniques 15 of 24 Houses and Schools
215 of 300 Advanced Techniques 16 of 24 Knuth Division
216 of 300 Advanced Techniques 17 of 24 Apples and Bananas
217 of 300 Advanced Techniques 18 of 24 One Bit Positions
218 of 300 Advanced Techniques 19 of 24 Signal Processing
219 of 300 Advanced Techniques 20 of 24 New Roads Queries
220 of 300 Advanced Techniques 21 of 24 Dynamic Connectivity
221 of 300 Advanced Techniques 22 of 24 Parcel Delivery
222 of 300 Advanced Techniques 23 of 24 Task Assignment
223 of 300 Advanced Techniques 24 of 24 Distinct Routes II
224 of 300 Additional Problems 01 of 77 Shortest Subsequence
225 of 300 Additional Problems 02 of 77 Counting Bits
226 of 300 Additional Problems 03 of 77 Swap Game
227 of 300 Additional Problems 04 of 77 Prüfer Code
228 of 300 Additional Problems 05 of 77 Acyclic Graph Edges
229 of 300 Additional Problems 06 of 77 Strongly Connected Edges
230 of 300 Additional Problems 07 of 77 Even Outdegree Edges
231 of 300 Additional Problems 08 of 77 Multiplication Table
232 of 300 Additional Problems 09 of 77 Advertisement
233 of 300 Additional Problems 10 of 77 Special Substrings
234 of 300 Additional Problems 11 of 77 Permutation Inversions
235 of 300 Additional Problems 12 of 77 Maximum Xor Subarray
236 of 300 Additional Problems 13 of 77 Movie Festival Queries
237 of 300 Additional Problems 14 of 77 Chess Tournament
238 of 300 Additional Problems 15 of 77 Tree Traversals
239 of 300 Additional Problems 16 of 77 Network Renovation
240 of 300 Additional Problems 17 of 77 Graph Girth
241 of 300 Additional Problems 18 of 77 Intersection Points
242 of 300 Additional Problems 19 of 77 Inverse Inversions
243 of 300 Additional Problems 20 of 77 Monotone Subsequences
244 of 300 Additional Problems 21 of 77 String Reorder
245 of 300 Additional Problems 22 of 77 Stack Weights
246 of 300 Additional Problems 23 of 77 Pyramid Array
247 of 300 Additional Problems 24 of 77 Increasing Subsequence II
248 of 300 Additional Problems 25 of 77 String Removals
249 of 300 Additional Problems 26 of 77 Bit Inversions
250 of 300 Additional Problems 27 of 77 Xor Pyramid
251 of 300 Additional Problems 28 of 77 Writing Numbers
252 of 300 Additional Problems 29 of 77 String Transform
253 of 300 Additional Problems 30 of 77 Letter Pair Move Game
254 of 300 Additional Problems 31 of 77 Maximum Building I
255 of 300 Additional Problems 32 of 77 Sorting Methods
256 of 300 Additional Problems 33 of 77 Cyclic Array
257 of 300 Additional Problems 34 of 77 List of Sums
258 of 300 Additional Problems 35 of 77 Increasing Array II
259 of 300 Additional Problems 36 of 77 Food Division
260 of 300 Additional Problems 37 of 77 Bit Problem
261 of 300 Additional Problems 38 of 77 Swap Round Sorting
262 of 300 Additional Problems 39 of 77 Binary Subsequences
263 of 300 Additional Problems 40 of 77 Tree Isomorphism I
264 of 300 Additional Problems 41 of 77 Counting Sequences
265 of 300 Additional Problems 42 of 77 Critical Cities
266 of 300 Additional Problems 43 of 77 School Excursion
267 of 300 Additional Problems 44 of 77 Coin Grid
268 of 300 Additional Problems 45 of 77 Robot Path
269 of 300 Additional Problems 46 of 77 Programmers and Artists
270 of 300 Additional Problems 47 of 77 Course Schedule II
271 of 300 Additional Problems 48 of 77 Removing Digits II
272 of 300 Additional Problems 49 of 77 Coin Arrangement
273 of 300 Additional Problems 50 of 77 Counting Bishops
274 of 300 Additional Problems 51 of 77 Grid Puzzle I
275 of 300 Additional Problems 52 of 77 Grid Puzzle II
276 of 300 Additional Problems 53 of 77 Empty String
277 of 300 Additional Problems 54 of 77 Grid Paths
278 of 300 Additional Problems 55 of 77 Bit Substrings
279 of 300 Additional Problems 56 of 77 Reversal Sorting
280 of 300 Additional Problems 57 of 77 Counting Reorders
281 of 300 Additional Problems 58 of 77 Book Shop II
282 of 300 Additional Problems 59 of 77 Network Breakdown
283 of 300 Additional Problems 60 of 77 Visiting Cities
284 of 300 Additional Problems 61 of 77 Missing Coin Sum Queries
285 of 300 Additional Problems 62 of 77 Number Grid
286 of 300 Additional Problems 63 of 77 Maximum Building II
287 of 300 Additional Problems 64 of 77 Filling Trominos
288 of 300 Additional Problems 65 of 77 Stick Divisions
289 of 300 Additional Problems 66 of 77 Coding Company
290 of 300 Additional Problems 67 of 77 Flight Route Requests
291 of 300 Additional Problems 68 of 77 Two Stacks Sorting
292 of 300 Additional Problems 69 of 77 Tree Isomorphism II
293 of 300 Additional Problems 70 of 77 Forbidden Cities
294 of 300 Additional Problems 71 of 77 Area of Rectangles
295 of 300 Additional Problems 72 of 77 Grid Completion
296 of 300 Additional Problems 73 of 77 Creating Offices
297 of 300 Additional Problems 74 of 77 Permutations II
298 of 300 Additional Problems 75 of 77 Functional Graph Distribution
299 of 300 Additional Problems 76 of 77 New Flight Routes
300 of 300 Additional Problems 77 of 77 Grid Path Construction