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 results3,694 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Magical CraftingGiven binary crafting recipes with diamond costs, decide for each target string of glow stones whether it can be produced from 'A' and find the minimum diamond cost. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 5s | 128 MB | Judgeable |
| Disjoint Regular ExpressionsGiven two regular expressions, decide whether any non-empty string matches both, and if so print the shortest lexicographically smallest such string. | Hard8 | Dynamic programmingBFS+2 | No attempts yet | 2s | 128 MB | Judgeable |
| The Great TricksterCount integers from 0 to n whose base-k and base(-k) representations are identical, with n up to 10^15 and k up to 1000. | Hard8 | MathNumber theory+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CommandoPartition soldiers into consecutive blocks, each block's score is a concave quadratic of its sum, and maximize the total score. | Hard8 | Dynamic programmingDivide and conquer+2 | No attempts yet | 1s | 64 MB | Judgeable |
| PatrolBuild K (1 or 2) unit-length shortcuts in a tree so that the shortest closed walk from village 1 covering every edge exactly as required is minimized. | Hard8 | TreeDynamic programming+2 | No attempts yet | 1s | 64 MB | Judgeable |
| Digging for OilPlace three non-overlapping K by K squares on an M by N grid of oil estimates to maximize the total sum covered, with the grid up to 1500 by 1500. | Hard8 | Prefix sumDynamic programming+2 | No attempts yet | 2s | 128 MB | Judgeable |
| ATMGiven a directed graph with cash at each node, find the maximum total cash collectible on a walk from a start node to any restaurant, counting each node once. | Hard8 | GraphShortest path+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Have You Driven a Fjord Lately?Choose integer-length bridges across fjords, each spanning one fjord, to maximize road length saved while total bridge length stays within m. | Hard8 | GeometryDynamic programming+2 | No attempts yet | 5s | 128 MB | Judgeable |
| Target PracticeGiven n points in 3D, find the minimum number of straight lines needed to cover all of them. | Hard8 | GeometryDynamic programming+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Teleport Out!Grid maze with exits; each step you either walk to an adjacent open cell or teleport to a uniformly random open cell. Find the minimum expected number of steps to reach an exit. | Hard8 | Dynamic programmingBFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| WormsGiven string rewriting rules, find the minimum number of days to grow the target worm from one cell, where each day any subset of cells splits. | Hard8 | Dynamic programmingIntervals+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Paper RouteWith N+1 nodes and exactly N roads, find the cheapest closed walk from node 0 covering all addresses, then add the campus travel cost from wherever you end. | Hard8 | GraphDFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| DivorcePick two disjoint subsets of up to 24 houses with equal sums, maximizing that common sum, and report the value of the houses left out. | Hard8 | Dynamic programmingBit manipulation+2 | No attempts yet | 30s | 128 MB | Judgeable |
| Stack MachineFor each pair of intersections, find the shortest route whose sequence of board and leave events forms a balanced stack (empty at start and end). | Hard8 | GraphShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Rotate to RootGiven a binary tree, compute the height of the tree after each node is rotated to the root one at a time. | Hard8 | TreeDFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Rocket StagesChoose a subsequence of stages, in order, with total mass at most 10000 kg and never negative net acceleration, to maximize the final burnout velocity. | Hard8 | Dynamic programmingMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Bus Driver SeungjaeGiven a graph with hotels, a start, and a sightseeing spot, find the shortest closed route that picks up and drops off each hotel while keeping half of the drop-offs within the first half of pick-ups. | Hard8 | GraphShortest path+2 | No attempts yet | 3s | 128 MB | Judgeable |
| Fibonacci WordGiven a bit pattern p and an index n up to 100, count the possibly overlapping occurrences of p inside the Fibonacci word F(n), whose length grows exponentially. | Hard8 | String matchingDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Robot VacuumGiven a convex polygon and an interior start point, find the shortest closed route that touches (or bumps into) every edge and returns to the start. | Hard8 | GeometryGreedy+2 | No attempts yet | 5s | 128 MB | Judgeable |
| Chip DesignPlace the most widgets on an N x N chip so row counts equal column counts and no row or column exceeds A/B of the total parts. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 10s | 128 MB | Judgeable |
| Machine WorksBuy and resell at most one machine at a time over D days, each machine usable from its sale day, to maximize final cash. | Hard8 | Dynamic programmingSorting+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Magic SticksSplit a chain of segments into disjoint runs of consecutive segments, close each run into a cyclic polygon, and maximize the total area, where each polygon's best area is the cyclic one. | Hard8 | Dynamic programmingGeometry+2 | No attempts yet | 8s | 128 MB | Judgeable |
| PyramidsGiven a count of stones, find the smallest set of distinct high or low pyramids (height at least 2) that uses every stone, breaking ties by maximizing sizes lexicographically, or report impossible. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 5s | 512 MB | Judgeable |
| GangsRank all lattice paths of E and S steps from (1,1) to the diagonal at (N,N) by a recursive 'OG' order, and output the run at rank M or ERROR. | Hard8 | CombinatoricsDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CarpoolSplit n people into the fewest 5-seat cars, route each car through its passengers' errand stops, and minimize the maximum car travel time. | Hard8 | GraphShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| A Brief GerrymanderChoose A avenue boundaries including 1 and 100 to maximize the number of vertical strips that contain at least one marked neighborhood, given fixed street boundaries. | Hard8 | Dynamic programmingSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Jogging TrailsFind the shortest closed walk that traverses every undirected weighted edge at least once, where the walk may start at any vertex. | Hard8 | GraphShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Snow ClearingFind the minimum time to plow every directed lane of a city's two-way streets and return to the hangar, given faster travel on already-cleared lanes. | Hard8 | GraphShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Saruman's Level UpFor each N up to 10^16, count how many integers i in [1, N] have a binary digit sum that is a multiple of 3. | Hard8 | Dynamic programmingBit manipulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Tile CutGiven a grid of W, I, N letters, find the maximum number of disjoint straight or L-shaped triominoes spelling WIN. | Hard8 | GraphDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Zombie SwallowsFor each of up to 30 swallows, decide whether some subset of up to 150 insect weights sums to a value in the range [Cmin, Cmax]. | Hard8 | Dynamic programmingBit manipulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Spare the Ewoks!Given an m by n grid with blocked cells, choose up to three non-overlapping axis-aligned rectangles to maximize the total covered area. | Hard8 | Dynamic programmingPrefix sum+1 | No attempts yet | 3s | 128 MB | Judgeable |
| Power GridCount the minimum-size edge sets connecting all living quarters to the power station on an 8x8 grid, modulo 1e9. | Hard8 | Dynamic programmingGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Optimal Strategy for the ICPCGiven up to 15 problem solving times, schedule them on three parallel workers within 300 minutes to maximize solved count, then minimize total completion-time penalty, with lexicographically smallest order. | Hard8 | Dynamic programmingBit manipulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Cover UpGiven up to 5000 boards, each with d columns of distinct digits, compute the probability the contestant eventually wins Cover Up, assuming uniform random picks among untried digits in unfinished columns. | Hard8 | ProbabilityDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Operation: Merchant BoorineiGiven moving vessels and a faster sleigh that spends one hour unloading at each, find the minimum time to visit every vessel and return to the start. | Hard8 | Dynamic programmingGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Panic RoomGiven a house of rooms with directed doors, intruder positions, and a panic room, find the minimum number of doors to lock so no intruder reaches it, or report impossible. | Hard8 | GraphMinimum spanning tree+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Mark of a WizardOn a small DAG, find the shortest path from A to F and the fewest intersections to mark so that following marks still guarantees the shortest time. | Hard8 | GraphShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Quick SearchGiven a small graph and k officers all starting at A, find the minimum time for the officers to jointly visit every node, where each officer walks a path. | Hard8 | GraphDynamic programming+1 | No attempts yet | 1s | 128 MB | Judgeable |
| GHOSTGiven a GHOST position and dictionary, decide whether the computer should challenge, add the smallest safe letter, or bluff. | Hard8 | Game theoryTrie+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Unhappy NumbersCount numbers in [lo, hi] that never reach 1 under the digit-square-sum map; bounds go up to 1e18 so answers need digit DP over precomputed unhappy states. | Hard8 | MathDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Sloppy SortGiven a possibly inconsistent comparison function as an n by n table, find the permutation of 0 to n-1 with the fewest inversions, breaking ties by the lexicographically smallest one. | Hard8 | Dynamic programmingBit manipulation+2 | No attempts yet | 3s | 128 MB | Judgeable |
| Function OverloadingParse nested overloaded function calls; for each, determine whether resolution is unique, impossible, or ambiguous, counting ambiguity cases up to 1000. | Hard8 | Dynamic programmingImplementation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Pattern MatchingDecide whether digit sequences match patterns where digits match exactly and * and # stand for even and odd counts of arbitrary digits. | Hard8 | Dynamic programmingString matching | No attempts yet | 1s | 128 MB | Judgeable |
| City MergerGiven up to 14 uppercase city names, find the length of the shortest string that contains every name as a consecutive substring, allowing overlaps. | Hard8 | Dynamic programmingBit manipulation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Captain Q's TreasureGiven a grid with at most 15 digit cells, each stating how many chests lie in its 3x3 neighborhood, find the minimum number of chests consistent with all digits. | Hard8 | BacktrackingBrute force+2 | No attempts yet | 3s | 128 MB | Judgeable |
| Private SpaceChoose the smallest widest row width X (at most 12) so that all groups fit into triangular rows of widths X down to 1, keeping one empty seat between neighboring groups in a row. | Hard8 | Dynamic programmingBit manipulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Borg BoogieGiven a connected undirected graph and a fixed walk, find the probability that a random-walking sentry never collides or swaps with the captain during the walk. | Hard8 | Dynamic programmingProbability+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Code PermutationsCount permutations of 1..N whose order (LCM of cycle lengths) equals K, modulo 2^31-1. | Hard8 | CombinatoricsDynamic programming+2 | No attempts yet | 2s | 128 MB | Judgeable |
| DNA CopyGiven a source string S of length at most 18, find the minimum number of copy operations (each taking a contiguous substring of S or of the already-built target, optionally reversed) needed to assemble T. | Hard8 | Dynamic programmingBit manipulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Circle of DebtGiven three people's debts and the exact bills and coins each holds, find the minimum number of pieces that must change hands to settle all debts. | Hard8 | Dynamic programmingBacktracking+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Different DigitsFor each n below 65536, find the smallest positive multiple of n whose decimal form uses the fewest distinct digits. | Hard8 | BFSDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Lego Brick WallsDecide whether a rectangular wall can be tiled with given bricks of widths 1 to 3, respecting fixed bricks and the rule that joints in adjacent rows never align, given brick counts. | Hard8 | Dynamic programmingBacktracking+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Packages Par AvionProcess parcels arriving at airport 0, route each to its destination with a shortest-hop tie-break, then fill departing planes by 0/1 knapsack and report each flight's loaded value. | Hard8 | GraphShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Safety PrecautionsGiven a DAG where each node fails only after at least t dependencies have failed, choose nodes to protect so node n never fails, minimizing protection cost. | Hard8 | Dynamic programmingGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Stock TradingGiven known daily prices for n stocks over D days, starting capital C, and at most t buy or sell actions, maximize final cash. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Game of StonesGiven a directed acyclic graph with stones on nodes, two players alternately slide one stone along an edge; decide whether the first player wins. | Hard8 | Game theoryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Grid NimTwo players alternately remove a heap from either end of a row; a player cannot take three heaps in a row on their own turns, and the first player wins if their coin total is at least the second player's. | Hard8 | Game theoryDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Shortest PathsFor each edge on a given shortest a-b path, report the length of the shortest a-b route that avoids that edge. | Hard8 | Shortest pathGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Best TeamsGiven N players each with an age and distinct skill, and forbidden pairs that are adjacent in skill order, answer T queries each asking the maximum sum of at most K players with age at most A. | Hard8 | Dynamic programmingSorting+2 | No attempts yet | 2s | 128 MB | Judgeable |
| HeritageDivide a region under a polygonal line into parcels whose areas match given ratios, choosing vertical cuts that minimize the total fence length. | Hard8 | Dynamic programmingGeometry+2 | No attempts yet | 0.3s | 64 MB | Judgeable |
| Strange DreamCount ways to pick plates from boxes in a forward then backward pass so the recorded product is divisible by k, modulo l. | Hard8 | Dynamic programmingNumber theory+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Stairways of SaharnaSplit a sequence into k disjoint non-decreasing subsequences to maximize the total number of chosen elements, and output this maximum for every k up to the point where all n elements are used. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 0.2s | 128 MB | Judgeable |
| The Twin TowerCount perfect matchings of a 3x3xN grid graph where each of the 9N rooms pairs with an adjacent room, modulo 10007. | Hard8 | Dynamic programmingBit manipulation+2 | No attempts yet | 1s | 256 MB | Judgeable |
| BlackjackGiven the exact order of the remaining deck, decide which hands to play, how much to bet, and when to hit or stand, to maximize total profit. | Hard8 | Dynamic programmingGame theory+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Shepherds and EngineersGiven s sheep needed in town after b bridges whose tolls follow a strict divisibility rule, find the minimum starting number of sheep. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Another Dice GameCompute the probability that Jan reaches a target score of n in Pickomino with optimal play, given the dice, set-aside and worm rules. | Hard8 | Dynamic programmingProbability+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Good CoalitionEach party has seats and a survival probability; find the party subset holding at least 76 seats whose product of probabilities is maximized, and print it as a percentage. | Hard8 | Dynamic programmingProbability+2 | No attempts yet | 1s | 128 MB | Judgeable |
| BancopiaPlace up to m police posts, each halving one road's robbery probability, so that the safest a-to-b route has the smallest possible robbery probability. | Hard8 | GraphShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| FishGiven fish lengths and gem kinds, count how many distinct gem-count combinations a single fish can ever hold, modulo M, where a fish can eat another only if at least twice as long. | Hard8 | Dynamic programmingSorting+2 | No attempts yet | 3s | 128 MB | Judgeable |
| Balanced Garden in a RowCount balanced binary strings of length N whose every substring has at most two more L than P, and find the lexicographic rank of a given string modulo M. | Hard8 | Dynamic programmingCombinatorics+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Sabotaging the Marathon TrainingGiven a spanning tree of paved edges plus weighted unpaved edges, delete cheap unpaved edges so that no even-length simple cycle remains. | Hard8 | GraphDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TwofiveMap between a valid 5x5 standard Young tableau word and its rank, the count of valid words lexicographically before it. | Hard8 | CombinatoricsDynamic programming+1 | No attempts yet | 1s | 128 MB | Judgeable |
| DepotGiven the final row placement produced by the depot insertion rule, count how many arrival orders of the containers could have produced it. | Hard8 | Dynamic programmingCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| PolygonRemove one edge of a polygon, then repeatedly merge adjacent vertices by the intervening + or *, and report the maximum final value plus every edge whose removal reaches it. | Hard8 | Dynamic programmingIntervals+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Souvenir Shopping Plan (Gifts)On an H by W grid with blocked houses, move from the top-left to the bottom-right, taking at most K steps north or west, and maximize the number of distinct souvenir shops visited. | Hard8 | Dynamic programmingMatrix+1 | No attempts yet | 15s | 128 MB | Judgeable |
| Zigzag NumbersCount numbers in [A, B], up to 500 digits, that are divisible by M and whose adjacent digit comparisons alternate up then down. | Hard8 | Dynamic programmingMath+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Bingo GameCount N x N grids with distinct values from 1 to M, columns increasing downward, each column larger than all columns to its left, and total sum S, modulo 100000. | Hard8 | Dynamic programmingCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Moving Cups Across Three TraysCups of sizes 1..n sit stacked (largest on top) on three trays; with moves allowed only between A-B and B-C, find the minimum number of moves to gather every cup onto A or C, or report -1 if more than m are needed. | Hard8 | BFSDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| AltarCount the sequences of nonnegative column heights reachable by repeatedly raising the interior of any equal-height range by 1, matching known heights where not stolen (-1). | Hard8 | Dynamic programmingCombinatorics+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Ultimate DeviceEach of n distinct cycle lengths is chosen by a fair coin; find the expected LCM of the chosen subset, output as (r * 2^n) mod 10007 or "not integer". | Hard8 | Dynamic programmingMath+2 | No attempts yet | 10s | 128 MB | Judgeable |
| Spelling SuggestionGiven weighted edit costs including keyboard-aware substitution and transposition, find the dictionary words closest to each query word. | Hard8 | Dynamic programmingString+2 | No attempts yet | 12s | 128 MB | Judgeable |
| Tree PathGiven a directed tree, find the minimum number of reversed-edge paths to add so that every node can reach every other node. | Hard8 | TreeGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Totally Important EdgesGiven a directed flow network, count the edges whose capacity decrease by 1 lowers the maximum flow by exactly 1. | Hard8 | GraphShortest path+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Highway PatrolChoose a subset of directed edges to patrol, containing all forced edges and at least one edge, with equal patrolled in-degree and out-degree at every vertex, minimizing total patrol plus surveillance cost. | Hard8 | GraphDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Boxes and StonesCount the initial distributions of S indistinguishable stones among the first B-1 boxes from which Carole, moving second each round, can force a win against Paul. | Hard8 | Game theoryCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Game of TilesTwo players alternately extend a path of numbered tiles on a grid with blocked cells; the player unable to move loses. Determine the winner under optimal play. | Hard8 | GraphGame theory+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Code LockGiven a target lowercase string starting from all 'a', find the minimum number of moves where each move shifts a contiguous block of wheels up or down by one. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| GrapevineGiven a monotone matrix of heights and height-interval queries, find for each query the largest square submatrix whose heights all fall in the interval. | Hard8 | Binary searchDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| DNA SubsequenceFind the longest common subsequence of two words where every maximal matched run must be a contiguous block of at least K characters in both words. | Hard8 | Dynamic programmingString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Power GenerationBuild the tree formed by attaching each new plant to the nearest older one, then split it into the most connected subtrees each having total capacity at least C. | Hard8 | TreeDynamic programming+2 | No attempts yet | 3s | 128 MB | Judgeable |
| Optical FiberGiven a tree of cities, each with up to 50 candidate router sites, pick one site per city to minimize the sum of Euclidean edge lengths. | Hard8 | Dynamic programmingTree+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Kryptonite MineFind the route from start to exit that minimizes walking distance, using at most N teleports between booths that share an unobstructed line of sight. | Hard8 | GeometryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Monkey BusinessCount the ways to distribute exactly B fruits and vegetables among G groups so each group satisfies the per-group rules and totals, modulo a prime. | Hard8 | Dynamic programmingCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Crocodile's Underground CityFind the minimum guaranteed escape time from room 0 to any exit room when a gatekeeper blocks one corridor at each room before Chulsoo moves. | Hard8 | GraphShortest path+2 | No attempts yet | 2s | 256 MB | Judgeable |
| ElephantsAfter each of M moves that relocate one elephant, report the minimum number of length-L segments needed to cover all current positions. | Hard8 | Segment treeDynamic programming+2 | No attempts yet | 12s | 256 MB | Judgeable |
| PhotoGiven intervals each containing exactly one marked point, find the maximum number of marked points, or -1 if no assignment is consistent. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Route DesignGiven two banks of valued sites and a set of non-crossing routes, find the maximum total value of a tour that alternates between banks without intersecting routes. | Hard8 | Dynamic programmingSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Gangs of CowstantinopleGiven gang sizes, decide if gang 1 can control the field at the end, and find the lexicographically earliest arrival order maximizing the surviving gang-1 cows. | Hard8 | GreedyImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Balanced TreesGiven a tree whose nodes are labeled with parentheses, find the maximum nesting depth over all paths that spell a balanced parenthesis string. | Hard8 | TreeDFS+2 | No attempts yet | 1s | 128 MB | Judgeable |