{"id":20774272,"url":"https://github.com/kantuni/cses","last_synced_at":"2026-04-29T05:02:05.609Z","repository":{"id":105280296,"uuid":"475155122","full_name":"kantuni/CSES","owner":"kantuni","description":"Solutions to CSES Problems","archived":false,"fork":false,"pushed_at":"2024-10-30T06:04:15.000Z","size":153,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T07:44:28.116Z","etag":null,"topics":["competitive-programming","cses","solutions"],"latest_commit_sha":null,"homepage":"https://cses.fi/problemset","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kantuni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-28T19:44:23.000Z","updated_at":"2024-10-30T06:04:18.000Z","dependencies_parsed_at":"2024-10-30T07:28:20.963Z","dependency_job_id":null,"html_url":"https://github.com/kantuni/CSES","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kantuni%2FCSES","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kantuni%2FCSES/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kantuni%2FCSES/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kantuni%2FCSES/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kantuni","download_url":"https://codeload.github.com/kantuni/CSES/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243112191,"owners_count":20238182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["competitive-programming","cses","solutions"],"created_at":"2024-11-17T12:28:58.298Z","updated_at":"2025-12-25T05:32:24.769Z","avatar_url":"https://github.com/kantuni.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solutions to [CSES](https://cses.fi/problemset/) Problems\n\n## Introductory Problems\n\n1. Weird Algorithm\n[[source]](https://cses.fi/problemset/task/1068)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/weird-algorithm.cpp)\n2. Missing Number\n[[source]](https://cses.fi/problemset/task/1083)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/missing-number.cpp)\n3. Repetitions\n[[source]](https://cses.fi/problemset/task/1069)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/repetitions.cpp)\n4. Increasing Array\n[[source]](https://cses.fi/problemset/task/1094)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/increasing-array.cpp)\n5. Permutations\n[[source]](https://cses.fi/problemset/task/1070)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/permutations-v2.cpp)\n6. Number Spiral\n[[source]](https://cses.fi/problemset/task/1071)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/number-spiral.cpp)\n7. Two Knights\n[[source]](https://cses.fi/problemset/task/1072)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/two-knights.cpp)\n8. Two Sets\n[[source]](https://cses.fi/problemset/task/1092)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/two-sets.cpp)\n9. Bit Strings\n[[source]](https://cses.fi/problemset/task/1617)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/bit-strings.cpp)\n10. Trailing Zeros\n[[source]](https://cses.fi/problemset/task/1618)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/trailing-zeros.cpp)\n11. Coin Piles\n[[source]](https://cses.fi/problemset/task/1754)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/coin-piles.cpp)\n12. Palindrome Reorder\n[[source]](https://cses.fi/problemset/task/1755)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/palindrome-reorder.cpp)\n13. Gray Code\n[[source]](https://cses.fi/problemset/task/2205)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/gray-code.cpp)\n14. Tower of Hanoi\n[[source]](https://cses.fi/problemset/task/2165)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/tower-of-hanoi.cpp)\n15. Creating Strings\n[[source]](https://cses.fi/problemset/task/1622)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/creating-strings.cpp)\n16. Apple Division\n[[source]](https://cses.fi/problemset/task/1623)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/apple-division.cpp)\n17. Chessboard and Queens\n[[source]](https://cses.fi/problemset/task/1624)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/chessboard-and-queens.cpp)\n18. Raab Game I\n[[source]](https://cses.fi/problemset/task/3399)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/raab-game-i.cpp)\n20. Digit Queries\n[[source]](https://cses.fi/problemset/task/2431)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/digit-queries.cpp)\n21. Grid Paths\n[[source]](https://cses.fi/problemset/task/1625)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Introductory%20Problems/grid-paths.cpp)\n\n## Sorting and Searching\n\n1. Distinct Numbers\n[[source]](https://cses.fi/problemset/task/1621)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/distinct-numbers.cpp)\n2. Apartments\n[[source]](https://cses.fi/problemset/task/1084)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/apartments.cpp)\n3. Ferris Wheel\n[[source]](https://cses.fi/problemset/task/1090)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/ferris-wheel.cpp)\n4. Concert Tickets\n[[source]](https://cses.fi/problemset/task/1091)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/concert-tickets.cpp)\n5. Restaurant Customers\n[[source]](https://cses.fi/problemset/task/1619)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/restaurant-customers.cpp)\n6. Movie Festival\n[[source]](https://cses.fi/problemset/task/1629)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/movie-festival.cpp)\n7. Sum of Two Values\n[[source]](https://cses.fi/problemset/task/1640)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/sum-of-two-values.cpp)\n8. Maximum Subarray Sum\n[[source]](https://cses.fi/problemset/task/1643)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/maximum-subarray-sum.cpp)\n9. Stick Lengths\n[[source]](https://cses.fi/problemset/task/1074)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/stick-lengths.cpp)\n10. Missing Coin Sum\n[[source]](https://cses.fi/problemset/task/2183)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/missing-coin-sum.cpp)\n11. Collecting Numbers\n[[source]](https://cses.fi/problemset/task/2216)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/collecting-numbers.cpp)\n12. Collecting Numbers II\n[[source]](https://cses.fi/problemset/task/2217)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/collecting-numbers-ii.cpp)\n13. Playlist\n[[source]](https://cses.fi/problemset/task/1141)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/playlist.cpp)\n14. Towers\n[[source]](https://cses.fi/problemset/task/1073)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/towers.cpp)\n15. Traffic Lights\n[[source]](https://cses.fi/problemset/task/1163)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/traffic-lights.cpp)\n16. Josephus Problem I\n[[source]](https://cses.fi/problemset/task/2162)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/josephus-problem-i.cpp)\n17. Josephus Problem II\n[[source]](https://cses.fi/problemset/task/2163)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/josephus-problem-ii.cpp)\n18. Nested Ranges Check\n[[source]](https://cses.fi/problemset/task/2168)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/nested-ranges-check.cpp)\n19. Nested Ranges Count\n[[source]](https://cses.fi/problemset/task/2169)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/nested-ranges-count.cpp)\n20. Room Allocation\n[[source]](https://cses.fi/problemset/task/1164)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/room-allocation.cpp)\n22. Factory Machines\n[[source]](https://cses.fi/problemset/task/1620)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/factory-machines.cpp)\n23. Tasks and Deadlines\n[[source]](https://cses.fi/problemset/task/1630)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/tasks-and-deadlines.cpp)\n24. Reading Books\n[[source]](https://cses.fi/problemset/task/1631)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/reading-books.cpp)\n25. Sum of Three Values\n[[source]](https://cses.fi/problemset/task/1641)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/sum-of-three-values.cpp)\n26. Sum of Four Values\n[[source]](https://cses.fi/problemset/task/1642)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/sum-of-four-values.cpp)\n27. Nearest Smaller Values\n[[source]](https://cses.fi/problemset/task/1645)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/nearest-smaller-values.cpp)\n28. Subarray Sums I\n[[source]](https://cses.fi/problemset/task/1660)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/subarray-sums-i.cpp)\n29. Subarray Sums II\n[[source]](https://cses.fi/problemset/task/1661)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/subarray-sums-ii.cpp)\n30. Subarray Divisibility\n[[source]](https://cses.fi/problemset/task/1662)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/subarray-divisibility.cpp)\n31. Subarray Distinct Values\n[[source]](https://cses.fi/problemset/task/2428)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/subarray-distinct-values.cpp)\n32. Array Division\n[[source]](https://cses.fi/problemset/task/1085)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/array-division.cpp)\n33. Sliding Median\n[[source]](https://cses.fi/problemset/task/1076)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/sliding-median.cpp)\n34. Sliding Cost\n[[source]](https://cses.fi/problemset/task/1077)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/sliding-cost.cpp)\n35. Movie Festival II\n[[source]](https://cses.fi/problemset/task/1632)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Sorting%20and%20Searching/movie-festival-ii.cpp)\n\n## Dynamic programming\n\n1. Dice Combinations\n[[source]](https://cses.fi/problemset/task/1633)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Dynamic%20Programming/dice-combinations.cpp)\n2. Minimizing Coins\n[[source]](https://cses.fi/problemset/task/1634)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Dynamic%20Programming/minimizing-coins.cpp)\n3. Coin Combinations I\n[[source]](https://cses.fi/problemset/task/1635)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Dynamic%20Programming/coin-combinations-i.cpp)\n5. Removing Digits\n[[source]](https://cses.fi/problemset/task/1637)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Dynamic%20Programming/removing-digits.cpp)\n6. Grid Paths I\n[[source]](https://cses.fi/problemset/task/1638)\n[[solution]](https://github.com/kantuni/CSES/blob/main/Dynamic%20Programming/grid-paths-i.cpp)\n\nProblems solved: **59**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkantuni%2Fcses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkantuni%2Fcses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkantuni%2Fcses/lists"}