Curated sets
Interview core
The mediums that show up in real onsite loops.
Total results1,547 problems
| Topics | Judge | |||||
|---|---|---|---|---|---|---|
| Perfect ChoirGiven sorted starting notes for N singers, each measure moves one singer up and another down by one; find the minimum measures until all notes are equal, or -1 if impossible. | Medium7 | MathGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Road ConstructionGiven a weighted bidirectional graph, find the minimum total building cost of a spanning subgraph that keeps every pairwise connection and preserves the shortest distance from the capital to every city. | Medium7 | GraphShortest path+2 | No attempts yet | 8s | 512 MB | Judgeable |
| Expect to WaitGiven a time-ordered schedule of unicycle drops and grouped requests, compute the total wait time of all requesters for each of several starting unicycle counts, or report infinity if anyone is left waiting. | Medium7 | Prefix sumBinary search+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Longest Increasing Subsequence 4Find a longest strictly increasing subsequence of A, and among all of maximum length output the lexicographically smallest one along with its length. | Medium7 | Dynamic programmingBinary search+2 | No attempts yet | 1s | 256 MB | Judgeable |
| ProbabilityGiven probabilities of letters A to D, find the probability that an optimally played game fills a row of n cells in alphabetical order. | Medium7 | Dynamic programmingProbability+2 | No attempts yet | 1.5s | 512 MB | Judgeable |
| FormulaFind the maximum number of edges in a closed trail that uses every important edge at least once, or report that none exists. | Medium7 | GraphBit manipulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| MajstorChoose a prerequisite-closed set of jobs that maximizes total fee divided by total hours, with the quotient floored. | Medium7 | GreedySorting+2 | No attempts yet | 3s | 128 MB | Judgeable |
| Arranging HeapsDivide N ordered mining points into K groups, each group merging into one heap at its last point, minimizing total weighted distance moved. | Medium7 | Dynamic programmingDivide and conquer+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Christmas EveGiven n weighted warehouses on a line, choose k of them as teleporter sites so that moving every other warehouse's presents into a chosen site gives the least total weighted distance. | Medium7 | Dynamic programmingSorting+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Placing the CardsGiven the top view of overlapping rectangular cards, find the placement order that produces it, choosing the lexicographically smallest valid order. | Medium7 | GraphTopological sort+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Red Tape Committee (Large)Choose exactly K of N members, each with a known Yes probability, to maximize the chance that exactly half vote Yes. | Medium7 | Dynamic programmingProbability+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Close Match (Large)Fill question marks in two equal-length digit strings to make the scores as close as possible, breaking ties by the smallest C then smallest J. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Placing TilesGiven a grid with blocked cells, cover every empty cell with 1 x k horizontal or vertical tiles (k is any positive integer, chosen per tile) and minimize the number of tiles. | Medium7 | BacktrackingDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Longest Palindromic SubstringGiven a lowercase string of up to 100,000 characters, report the length of its longest palindromic substring. | Medium7 | StringString matching+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Counting Palindromes (Small)Count how many subsequences of a string of length up to 30 are palindromes, treating subsequences that use different positions as distinct. | Medium7 | Dynamic programmingString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| IliGiven a DAG of two-input OR gates where some gate outputs are measured, determine which remaining gate outputs are forced to a single value across all valid assignments of the wires. | Medium7 | GraphDFS+2 | No attempts yet | 4s | 1024 MB | Judgeable |
| Mahjong Waiting TilesGiven a 13 tile mahjong hand numbered 1 to 9, list every tile still available that completes the hand into one head plus four bodies, or into seven distinct heads. | Medium7 | BacktrackingRecursion+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Subin and the Melting CandyStarting at the origin and moving only right or up, visit baskets over time to maximize total candies collected, where a basket's candies shrink by one per time unit. | Medium7 | Dynamic programmingSorting | No attempts yet | 1s | 64 MB | Judgeable |
| Professional NetworkGiven N people, each joinable when Kevin's current connection count reaches A_i or by paying B_i points, find the minimum total points to connect with everyone. | Medium7 | GreedySorting+2 | No attempts yet | 2s | 512 MB | Judgeable |
| The cube loverGiven up to 10^18 unit cubes, find positive integer box dimensions x, y, z with x*y*z >= K that minimize the surface area 2(xy+yz+zx), breaking ties by lexicographically smallest triple. | Medium7 | MathNumber theory+2 | No attempts yet | 0.5s | 512 MB | Judgeable |
| Venue Rental (Large)Given up to 3000 axis-aligned rectangles, find the total area of their union, counting overlaps once. | Medium7 | GeometrySorting+2 | No attempts yet | 5s | 256 MB | Judgeable |
| Bathroom StallsSimulate K people choosing the emptiest interval by a tie-break rule, and report the gap sizes of the K-th chosen stall. | Medium7 | HeapGreedy+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Bathroom Stalls (Large)Simulate K people choosing bathroom stalls by the maximize-min-then-max-then-leftmost rule, and report the max and min distances for the last chooser when N can be 10^18. | Medium7 | HeapGreedy+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Binary String ToggleApply U range-toggle operations to an all-zero binary string and print the lexicographically largest string among all U+1 intermediate states. | Medium7 | Prefix sumGreedy+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Moving 2Given an N by N grid of candy amounts, collect the most candy over K monotone paths from (1,1) to (N,N), counting each cell only once. | Medium7 | Dynamic programmingImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| ConquerorConquer all cities from city 1, where the k-th city you take costs the edge cost plus (k-1)*t, and minimize the total. | Medium7 | Minimum spanning treeGreedy+2 | No attempts yet | 2s | 256 MB | Judgeable |
| How Many to Be Happy?For each edge find the fewest edges to delete so that it lies in some minimum spanning tree, then sum those counts. | Medium7 | Minimum spanning treeGraph+2 | No attempts yet | 0.5s | 512 MB | Judgeable |
| Envious ExponentsGiven N and k, find the smallest integer greater than N whose binary representation has exactly k ones. | Medium7 | Bit manipulationGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Biotechnology laboratoryGiven a string of lowercase letters weighted 1 to 26, count how many distinct total weights occur among all non-empty substrings. | Medium7 | Prefix sumTwo pointers+2 | No attempts yet | 7s | 1024 MB | Judgeable |
| Keeping On TrackGiven a tree with n+1 nodes, find the node whose removal splits it worst, then pick the best non-edge to add so the remaining disconnected pairs are minimized. | Medium7 | TreeDFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Deck of CardsTwo players alternate playing a card matching the table card in color or value; the first unable to move loses, so find the winner under optimal play. | Medium7 | Game theoryGraph+2 | No attempts yet | 5s | 512 MB | Judgeable |
| InitialsEach student's directory starts as last-initial plus first-initial; append letters from the full names so names strictly increase in class order, minimizing total letters added. | Medium7 | Dynamic programmingString+2 | No attempts yet | 3s | 512 MB | Judgeable |
| ArtistChoose exactly K blocks from N to minimize (sum of chosen widths) times (sum of chosen heights), where each block keeps its orientation. | Medium7 | Dynamic programmingSorting+2 | No attempts yet | 1s | 512 MB | Judgeable |
| BricksCount the distinct sets of occupied boxes reachable after M bricks fall, where a brick at an occupied position expands its run left or right. | Medium7 | Dynamic programmingIntervals | No attempts yet | 0.2s | 512 MB | Judgeable |
| Bumped!Given an undirected weighted road graph and up to 1000 directed free flights, find the cheapest s-to-t trip using at most one flight. | Medium7 | GraphShortest path+2 | No attempts yet | 2s | 512 MB | Judgeable |
| RhombinoesGiven live equilateral triangles on a W by H board, find the maximum number of non-overlapping rhombinoes, each covering two live triangles that share a side. | Medium7 | GraphDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| MizuyokanGiven a bar divided by N-1 score lines into segments of given lengths, cut along some lines so the longest and shortest resulting pieces differ as little as possible. | Medium7 | Dynamic programmingBinary search+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Minimum Edit 2Compute the minimum number of insertions, deletions, replacements, and adjacent swaps needed to turn string A into string B, with both strings up to length 1000. | Medium7 | Dynamic programmingString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| We Don't Wanna Work!Maintain a dynamic set of members whose top floor(20%) by motivation and join time are workhorses, and log every time a member's status flips after each join or departure. | Medium7 | TreeSorting+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Marble Escape 4On a small board with one red marble, one blue marble, and a single hole, tilt until the red marble falls through the hole while the blue never does; report the fewest tilts or -1. | Medium7 | BFSSimulation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Road ConstructionGiven a permutation, for each query [l,r] reverse that segment and report the number of maximal increasing runs in the resulting array. | Medium7 | ArrayMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Yonsei Water ParkGiven N stones in a line with values K_i, pick a starting stone and a sequence of distinct stones where each jump moves at most D positions, maximizing the sum of visited values. | Medium7 | Dynamic programmingSegment tree+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Solving cubic equations 2Find all real roots of a cubic with rational coefficients, printing them rounded to four decimals, using that at least one root is an integer. | Medium7 | MathBinary search+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Chicken DeliveryChoose at most M of the chicken restaurants to keep open so that the sum over all houses of the distance to the nearest open restaurant is minimized. | Medium7 | Brute forceBacktracking+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Marathon CourseChoose a simple path from 1 to N minimizing the cost of its roads, where each road costs C*(P-T)^2 when P > T, and find the largest P whose cost fits budget K. | Medium7 | Shortest pathGraph+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Block GameRemove every block so the heights leave in non-decreasing order, minimizing moves of a machine that walks left and right along the shrinking row. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Please Take My Gift 2Given a 1 by N arrow map where every walk stays inside, place the fewest gifts so that a walk from any starting cell hits a gift. | Medium7 | GraphGreedy+2 | No attempts yet | 2s | 256 MB | Judgeable |