Skip to content

lokeshwar777/cses-problem-set-solutions

Repository files navigation

@lokeshwar777's CSES ACs

Introductory Problems

S.No Title Sub. Links Add. Links
1 Weird Algorithm CPP
2 Missing Number CPP
3 Repetitions CPP
4 Increasing Array CPP
5 Permutations CPP
6 Number Spiral CPP | PY CPP1
7 Two Knights CPP | PY
8 Two Sets CPP
9 Bit Strings CPP
10 Trailing Zeros CPP
11 Coin Piles CPP | PY
12 Palindrome Reorder CPP
13 Gray Code CPP | PY
14 Tower of Hanoi CPP | PY
15 Creating Strings CPP CPP1
16 Apple Division CPP
17 Chessboard and Queens CPP CPP1 | CPP2
18 Raab Game I PY
19 Mex Grid Construction CPP | PY
20 Knight Moves Grid CPP | PY
21 Grid Coloring I CPP
22 Digit Queries CPP | PY
23 String Reorder PY
24 Grid Path Description CPP

Sorting and Searching

S.No Title Sub. Links Add. Links
1 Distinct Numbers CPP [CPP1]
2 Apartments CPP
3 Ferris Wheel CPP
4 Concert Tickets CPP
5 Restaurant Customers CPP
6 Movie Festival CPP
7 Sum of Two Values CPP [CPP1]
8 Maximum Subarray Sum CPP
9 Stick Lengths CPP
10 Missing Coin Sum CPP CPP1
11 Collecting Numbers CPP | PY
12 Collecting Numbers II CPP | [PY]
13 Playlist [PY] CPP1
14 Towers CPP [CPP1]
15 Traffic Lights [CPP] CPP1
16 Distinct Values Subarrays [PY] CPP1
17 Distinct Values Subsequences CPP
18 Josephus Problem I CPP [CPP1]
19 Josephus Problem II [CPP] [CPP1] | [CPP2]
20 Nested Ranges Check [CPP] CPP1
21 Nested Ranges Count [CPP] CPP1
22 Room Allocation [CPP] CPP1
23 Factory Machines CPP
24 Tasks and Deadlines CPP CPP1
25 Reading Books CPP
26 Sum of Three Values CPP
27 Sum of Four Values [CPP] CPP1
28 Nearest Smaller Values CPP CPP1
29 Subarray Sums I [CPP]
30 Subarray Sums II CPP
31 Subarray Divisibility [CPP] CPP1
32 Distinct Values Subarrays II CPP
33 Array Division CPP
34 Movie Festival II CPP
35 Maximum Subarray Sum II [CPP] | PY PY1 | [CPP1]

Dynamic Programming

S.No Title Sub. Links Add. Links
1 Dice Combinations CPP | PY
2 Minimizing Coins CPP CPP1 | CPP2
3 Coin Combinations I CPP CPP1
4 Coin Combinations II CPP CPP1
5 Removing Digits [CPP] CPP1 | CPP2
6 Grid Paths I CPP CPP1
7 Book Shop CPP CPP1
8 Array Description [CPP] CPP1 | CPP2
9 Counting Towers [CPP] CPP1
10 Edit Distance [CPP] CPP1 | CPP2 | CPP3
11 Longest Common Subsequence CPP | PY [CPP1]
12 Rectangle Cutting CPP
13 Minimal Grid Path [CPP]
14 Money Sums CPP [CPP1] | [CPP2]
15 Removal Game CPP
16 Two Sets II CPP CPP1
17 Mountain Ranges [CPP]
18 Increasing Subsequence CPP
19 Projects [CPP]
20 Elevator Rides [CPP]
21 Counting Tilings [CPP]
22 Counting Numbers [CPP]
23 Increasing Subsequence II [CPP]

Graph Algorithms

S.No Title Sub. Links Add. Links
1 Counting Rooms CPP CPP1
2 Labyrinth CPP CPP1
3 Building Roads CPP CPP1
4 Message Route [CPP] CPP1 | CPP2
5 Building Teams CPP CPP1
6 Round Trip [CPP] CPP1 | CPP2 | CPP3
7 Monsters CPP
8 Shortest Routes I CPP
9 Shortest Routes II CPP
10 High Score CPP

Range Queries

S.No Title Sub. Links Add. Links
1 Static Range Sum Queries CPP
2 Static Range Minimum Queries CPP | PY CPP1
3 Dynamic Range Sum Queries CPP | PY CPP1 | PY1
4 Dynamic Range Minimum Queries CPP
5 Range Xor Queries CPP
6 Range Update Queries CPP | PY CPP1
7 Forest Queries CPP CPP1
8 Hotel Queries CPP
9 List Removals CPP1
22 Range Updates and Sums CPP

Tree Algorithms

S.No Title Sub. Links Add. Links
1 Subordinates CPP
2 Tree Matching CPP
3 Tree Diameter CPP CPP1 | CPP2 | CPP3
4 Tree Distances I CPP CPP1
5 Tree Distances II CPP CPP1
6 Company Queries I CPP CPP1
7 Company Queries II CPP CPP1
8 Distance Queries CPP
9 Counting Paths CPP
10 Subtree Queries CPP CPP1
11 Path Queries CPP
12 Path Queries II CPP
13 Distinct Colors [CPP]
14 Finding a Centroid [CPP]
15 Fixed-Length Paths I [CPP]
16 Fixed-Length Paths II [CPP]

Mathematics

S.No Title Sub. Links Add. Links
2 Exponentiation CPP CPP1
3 Exponentiation II CPP
4 Counting Divisors CPP
5 Common Divisors CPP
32 Stick Game CPP
33 Nim Game I CPP
34 Nim Game II CPP
35 Stair Game CPP
36 Grundy’s Game CPP
37 Another Game CPP

Futute Improvements

  • Ensure each problem has a CPP | PY link with all possible additional submission links
  • Include most relevant references of limited size

Refs

  1. cp-algorithms
  2. Errichto - intro & DP
  3. Vivek Gupta - DP

About

ACs + submission links

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published