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 results1,020 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Coprime Products from Six IndicesGiven N integers, count ordered 6-tuples of indices whose three pairwise products mod 359999 = 599*601 have gcd 1, modulo 1e9+7. | Hard9 | Number theoryCombinatorics+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Beautiful ArchipelagoFor each queried sea level, count unordered pairs of islands (connected land regions after flooding) that are translation-equivalent in shape, over up to 1000x1000 grid and 100000 queries. | Hard9 | Union-findHash map+1 | No attempts yet | 2s | 128 MB | Judgeable |
| ContactGiven a binary string and a length range [A,B], report the N largest occurrence counts and all patterns achieving each count, with output ordering rules. | Hard9 | StringSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Yin and YangOn a tree with each edge colored black or white, count paths that split at an internal vertex into two legs each having equal numbers of black and white edges. | Hard9 | TreeDivide and conquer+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Accountant NotesFor each note, find every starting row in the summary file where a renamed transcription of the note appears as consecutive rows. | Hard9 | String matchingHash map+2 | No attempts yet | 5s | 512 MB | Judgeable |
| 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. | Hard9 | TreeHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| MultiplicationGiven prime p and each query pair a and b, find the smallest k with a to the k-th power congruent to b modulo p, or print -1 when b never appears. | Hard9 | Number theoryMath+1 | No attempts yet | 5s | 128 MB | Judgeable |
| Dangerous HashingFind two distinct lowercase strings of equal length (at most 300000) that collide under ten polynomial hashes with bases 29, 31, 37, 41, 43, 47, 53, 59, 61, 67 modulo 1e9+7. | Hard9 | MathNumber theory+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Bracket SubstringsCount how many distinct balanced bracket sequences appear as non-empty substrings of a given bracket string of length up to 500,000. | Hard9 | StringHash map+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Sequence and queries 12Maintain a dynamic sequence under point updates, deletions, and insertions, answering range queries for distinct count and the sum of triple products of distinct values. | Hard9 | Segment treeHash map+2 | No attempts yet | 2s | 512 MB | Judgeable |
| HackerSimulate substring comparisons, substring copy from a fixed string, and range letter-increment operations on a mutable string of length N. | Hard9 | Segment treeHash map+2 | No attempts yet | 4s | 512 MB | Judgeable |
| PseudoknotFind the largest t such that the string splits into u v z^R u^R y z with |u|>=t and |z|>=t, or report -1 if no such split exists. | Hard9 | StringString matching+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Congruence EquationCount ordered pairs (a, b) within 1 to p(p-1) whose residues satisfy a^b = b^a mod p, reducing to counting solutions of a discrete-log exponential congruence. | Hard9 | Number theoryMath+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Gahui's Sequence Mod Play (Large)Maintain a stack under push and pop, and after each type 3 query report the shortest suffix whose remainders mod m cover every residue from 0 to m-1, printing -1 if impossible. | Hard9 | StackTwo pointers+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Parameterized Pattern MatchingFind every substring of text T that p-matches pattern P, where parameter names must correspond under a bijection and tokens match exactly. | Hard9 | StringString matching+2 | No attempts yet | Not set | 16 MB | Judgeable |
| 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. | Hard9 | Brute forceRecursion+2 | No attempts yet | 2s | 256 MB | Judgeable |
| String AlgorithmFor every k, cut s into blocks of length k, discard the tail, and count block pairs whose Hamming distance is at most one. | Hard9 | StringHash map+2 | No attempts yet | 20s | 512 MB | Judgeable |
| DoublindromesCount distinct substrings of s that are palindromes and split into two non-empty palindromes, with length at least k. | Hard9 | StringString matching+2 | No attempts yet | 3s | 512 MB | Judgeable |
| Master Zhu and RootFor each query (x, y), find the smallest k >= 0 with x^k congruent to y modulo some prime divisor p of n, or report -1. | Hard9 | Number theoryMath+2 | No attempts yet | 3s | 512 MB | Judgeable |
| Find Marble Positions and VelocitiesReconstruct each marble's starting x-coordinate and constant velocity from N+1 unordered snapshots of N linearly moving marbles. | Hard10 | MathCombinatorics+2 | No attempts yet | 2s | 128 MB | Judgeable |