Skip to content

TanKaiYi0220/CSES-Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

CSES-Solution

Accepted solutions for CSES Problem Set.
These solutions are may not the best solution for each task.
I'm just sharing my own solutions or solution that I had found.

Table of Contents

Introductory Problems

Sorting and Searching

Dynamic Programming

  • Dice Combinations
  • Minimizing Coins
  • Coin Combinations I
  • Coin Combinations II
  • Removing Digits
  • Grid Paths
  • Book Shop
  • Array Description
  • Counting Towers
  • Edit Distance
  • Rectangle Cutting
  • Money Sums
  • Removal Game
  • Two Sets II
  • Increasing Subsequence
  • Projects
  • Elevator Rides
  • Counting Tilings
  • Counting Numbers

Graph Algorithms

  • Counting Rooms
  • Labyrinth
  • Building Roads
  • Message Route
  • Building Teams
  • Round Trip
  • Monsters
  • Shortest Routes I
  • Shortest Routes II
  • High Score
  • Flight Discount
  • Cycle Finding
  • Flight Routes
  • Round Trip II
  • Course Schedule
  • Longest Flight Route
  • Game Routes
  • Investigation
  • Planets Queries I
  • Planets Queries II
  • Planets Cycles
  • Road Reparation
  • Road Construction
  • Flight Routes Check
  • Planets and Kingdoms
  • Giant Pizza
  • Coin Collector
  • Mail Delivery
  • De Bruijn Sequence
  • Teleporters Path
  • Hamiltonian Flights
  • Knight's Tour
  • Download Speed
  • Police Chase
  • School Dance
  • Distinct Routes

Range Queries

  • Static Range Sum Queries
  • Static Range Minimum Queries
  • Dynamic Range Sum Queries
  • Dynamic Range Minimum Queries
  • Range Xor Queries
  • Range Update Queries
  • Forest Queries
  • Hotel Queries
  • List Removals
  • Salary Queries
  • Prefix Sum Queries
  • Pizzeria Queries
  • Subarray Sum Queries
  • Distinct Values Queries
  • Increasing Array Queries
  • Forest Queries II
  • Range Updates and Sums
  • Polynomial Queries
  • Range Queries and Copies

Tree Algorithms

  • Subordinates
  • Tree Matching
  • Tree Diameter
  • Tree Distances I
  • Tree Distances II
  • Company Queries I
  • Company Queries II
  • Distance Queries
  • Counting Paths
  • Subtree Queries
  • Path Queries
  • Path Queries II
  • Distinct Colors
  • Finding a Centroid
  • Fixed-Length Paths I
  • Fixed-Length Paths II

Mathematics

  • Josephus Queries
  • Exponentiation
  • Exponentiation II
  • Counting Divisors
  • Common Divisors
  • Sum of Divisors
  • Divisor Analysis
  • Prime Multiples
  • Counting Coprime Pairs
  • Binomial Coefficients
  • Creating Strings II
  • Distributing Apples
  • Christmas Party
  • Bracket Sequences I
  • Bracket Sequences II
  • Counting Necklaces
  • Counting Grids
  • Fibonacci Numbers
  • Throwing Dice
  • Graph Paths I
  • Graph Paths II
  • Dice Probability
  • Moving Robots
  • Candy Lottery
  • Inversion Probability
  • Stick Game
  • Nim Game I
  • Nim Game II
  • Stair Game
  • Grundy's Game
  • Another Game

String Algorithms

  • Word Combinations
  • String Matching
  • Finding Borders
  • Finding Periods
  • Minimal Rotation
  • Longest Palindrome
  • Required Substring
  • Palindrome Queries
  • Finding Patterns
  • Counting Patterns
  • Pattern Positions
  • Distinct Substrings
  • Repeating Substring
  • String Functions
  • Substring Order I
  • Substring Order II
  • Substring Distribution

Geometry

  • Point Location Test
  • Line Segment Intersection
  • Polygon Area
  • Point in Polygon
  • Polygon Lattice Points
  • Minimum Euclidean Distance
  • Convex Hull

Advanced Techniques

  • Meet in the Middle
  • Hamming Distance
  • Beautiful Subgrids
  • Reachable Nodes
  • Reachability Queries
  • Cut and Paste
  • Substring Reversals
  • Reversals and Sums
  • Necessary Roads
  • Necessary Cities
  • Eulerian Subgraphs
  • Monster Game I
  • Monster Game II
  • Subarray Squares
  • Houses and Schools
  • Knuth Division
  • Apples and Bananas
  • One Bit Positions
  • Signal Processing
  • New Roads Queries
  • Dynamic Connectivity
  • Parcel Delivery
  • Task Assignment
  • Distinct Routes II

Additional Problems

  • Shortest Subsequence
  • Counting Bits
  • Swap Game
  • Prüfer Code
  • Acyclic Graph Edges
  • Strongly Connected Edges
  • Even Outdegree Edges
  • Multiplication Table
  • Advertisement
  • Special Substrings
  • Permutation Inversions
  • Maximum Xor Subarray
  • Movie Festival Queries
  • Chess Tournament
  • Tree Traversals
  • Network Renovation
  • Graph Girth
  • Intersection Points
  • Inverse Inversions
  • Monotone Subsequences
  • String Reorder
  • Stack Weights
  • Pyramid Array
  • Increasing Subsequence II
  • String Removals
  • Bit Inversions
  • Xor Pyramid
  • Writing Numbers
  • String Transform
  • Letter Pair Move Game
  • Maximum Building I
  • Sorting Methods
  • Cyclic Array
  • List of Sums
  • Increasing Array II
  • Food Division
  • Bit Problem
  • Swap Round Sorting
  • Binary Subsequences
  • Tree Isomorphism I
  • Counting Sequences
  • Critical Cities
  • School Excursion
  • Coin Grid
  • Robot Path
  • Programmers and Artists
  • Course Schedule II
  • Removing Digits II
  • Coin Arrangement
  • Counting Bishops
  • Grid Puzzle I
  • Grid Puzzle II
  • Empty String
  • Grid Paths
  • Bit Substrings
  • Reversal Sorting
  • Counting Reorders
  • Book Shop II
  • Network Breakdown
  • Visiting Cities
  • Missing Coin Sum Queries
  • Number Grid
  • Maximum Building II
  • Filling Trominos
  • Stick Divisions
  • Coding Company
  • Flight Route Requests
  • Two Stacks Sorting
  • Tree Isomorphism II
  • Forbidden Cities
  • Area of Rectangles
  • Grid Completion
  • Creating Offices
  • Permutations II
  • Functional Graph Distribution
  • New Flight Routes
  • Grid Path Construction

Practice More

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published