Problems

Pick a problem and write your solution in the built-in editor. The judge runs it against real test cases while you watch, and the wider archive is open to read whenever you like.

Total results514 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
SleepwalkerA self-similar walk on a 3^k by 3^k grid is defined by a recursive rewrite; given a starting tile on the walk and a hole tile, find the number of steps until the walk reaches the hole.Hard9RecursionDivide and conquer+2No attempts yet1s128 MBJudgeable
AB-wordsGiven up to 1000 nice ab-words (balanced parentheses words), count the maximum subset of pairwise non-similar words under a recursive similarity relation.Hard9TreeHash map+2No attempts yet1s128 MBJudgeable
Recursive AntOn a 2^n by 2^n board with at most 50 forbidden cells, find for each of the four borders a cell where a recursive quarter-by-quarter Hamiltonian tour can end, or report none.Hard9Divide and conquerRecursion+2No attempts yet1s128 MBJudgeable
Dragon PatternCount how many times pattern S appears as a contiguous block in the length 2^n direction string of the order-n left dragon curve.Hard9String matchingRecursion+2No attempts yet5s128 MBJudgeable
Combinator ExpressionCount the fewest BCKI rewrite steps that reduce the given expression to its normal form.Hard9Dynamic programmingTree+1No attempts yet1s256 MBJudgeable
Laser SensorsGiven N blue points and 2N red points in general position, build the particular non-crossing perfect matching prescribed by the paper's recursive angular-sweep Solve/Attach procedure.Hard9Divide and conquerGeometry+2No attempts yet2s512 MBJudgeable
LegendsGiven a connected graph, decide whether it can be built from one of five small starting graphs using edge additions, isolated-vertex additions, and vertex splits (each split adds a new vertex adjacent to the old one).Hard9GraphDivide and conquer+2No attempts yet2s512 MBJudgeable
Fractal TreeFor a recursively defined fractal tree F_k, answer queries giving the distance between two DFS-labeled vertices.Hard9TreeRecursion+2No attempts yet7s512 MBJudgeable
N and MFind the eventual constant residue modulo M of the power tower N, N^N, N^{N^N}, ... given N and M up to 1e9.Hard9MathNumber theory+1No attempts yet1s1024 MBJudgeable
Mischievous JunseokGiven a short English word and a multiset of letters, count the distinct strings obtainable from any contiguous substring with that letter multiset under the recursive half-split-and-reverse rule.Hard9Brute forceRecursion+2No attempts yet2s256 MBJudgeable
Gosu 2Given a tournament on N players, find a transitive subtournament (chain) of size exactly 1 + floor(log2 N).Hard9Divide and conquerCombinatorics+2No attempts yet2s1024 MBJudgeable
Hanging RackGiven a binary hanging rack with 2^n hooks, find the hook number (mod 1e9+7) used on the k-th step when coats are hung to keep every rod balanced within 0 or 1.Hard9MathRecursion+2No attempts yet1s512 MBJudgeable
Regarding How a Simple DFS Problem I Thought Was Problem A Became Problem E in This Contest (Easy)Given a perfect binary tree with N = 2^k - 1 weighted nodes numbered in heap order and an implied axis-aligned layout, find the maximum sum of weights inside any axis-parallel rectangle whose sides don't cross a node.Hard9Divide and conquerDynamic programming+2No attempts yet2s512 MBJudgeable
Bitwise XorCount non-empty subsequences in which the pairwise xor of every two chosen elements is at least x, modulo 998244353.Hard9Bit manipulationTrie+2No attempts yet2s512 MBJudgeable