How To Problemset
Content
So, In competitive programming, I classify there are three kinds of problems:
- Optimizing
- Finding minimum or maximum value
- Counting
- Count how many ways to do something
- Count the length of something
- Constructing (This sometimes overlaps with optimizing)
- Make something so it satisfies a condition
- Checking if its possible to do something
There are some operators that can be used as an inspiration:
- Arithmetic operator
- Addition
- Subtraction
- Division
- Multiplication
- Exponentiation
- Modulo
- Bitwise operator
- And
- Or
- Xor
- Not
- Shuffling operator
- Swapping two elements
- Inserting element(s)
- Pushback or Pushfront element(s)
- Reversing a segment or subsequence
- Flipping bit(s), segment, or subsequence
- Sorting a segment or subsequence
- Math-heavy operator
- Combination, permutation, binomial, and derangements (FFT is here)
- GCD and LCM
- Inclusion and exclusion principle
- Sequence and summation
- Logarithm, binary, and N-ary operation
- Prime and factorization
- Geometry
There are some important objects and (data) structures that can be used as well:
- Strings
- Array
- Grid or Matrix
- Tree and Trie
- Directed and Undirected Graph
- Segment Tree
- Fenwick Tree (Binary-Indexed Tree)
- Queue, Deque, and Stack
- Linked-List
- Priority Queue, Set, and Ordered Set
- Square-Root Block Decomposition
- Geometry Objects
Now you have to look for theme:
- Food
- Stones
- Time
- Box
- Chess
- Game
- Sport
- Animal
- Themeless
Pick 3-5 of your poison and voila!
Leave a Comment