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 results6,373 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Dropping BlocksGiven pile heights, decide whether prefix-wise operations (add 1 to a prefix or a suffix starting at k) can produce exactly that array, and say valid or invalid. | Hard8 | GreedyMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Knights and DragonsGiven n distinct points (strength, magic), decide for each whether it lies in the convex hull of the others, since a point is reachable by repeated weighted averaging of the other points exactly when it is not a vertex of the hull. | Hard8 | GeometrySorting+2 | No attempts yet | 4s | 512 MB | Judgeable |
| Distance SumGiven a connected undirected unweighted graph with at most n+42 edges, compute the sum of shortest-path distances over all unordered vertex pairs. | Hard8 | GraphBFS+2 | No attempts yet | 4s | 512 MB | Judgeable |
| FractionsGiven n, represent 1 - 1/n as a sum of fractions with denominators dividing n and strictly between 1 and n, or report that no such sum exists. | Hard8 | MathNumber theory+2 | No attempts yet | 2s | 512 MB | Judgeable |
| King Kog's ReceptionKnights join or cancel reservations with a start time and duration; after each change, a query asks how long a visitor arriving at time t must wait, since she yields to a knight arriving at the same instant. | Hard8 | Segment treeBinary search+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Shooter IslandOn a 50 by 100000 grid, rectangles flood when hit, and after each query decide whether a radius-0.31416 boat can sail between two given squares on the remaining water. | Hard8 | Union-findIntervals+2 | No attempts yet | 3s | 512 MB | Judgeable |
| Erasing MatrixDecide whether all cells of a grid can be driven to zero by repeatedly adding the same integer k to two adjacent cells while keeping every value non-negative, and print a valid sequence of at most 10^6 operations. | Hard8 | GraphGreedy+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Nader ShahFrom roads and marked Afshari edges, reconstruct the root and capture order consistent with the growth rule, lexicographically minimum, or output Wrong Map!. | Hard8 | GraphGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Python ClassesReorder single-inheritance class definitions so every superclass appears before its subclasses, using the fewest cut-and-paste moves, or output -1 when superclass links form a cycle. | Hard8 | GreedyUnion-find+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Metal Bar CubeGiven the four viewing counts from left, right, top and bottom of an N by N grid, decide whether any placement of blocked cells can produce exactly those counts. | Hard8 | GreedyImplementation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Balance BeamChoose at each beam position a cash value or a fair coin random walk stopped at the ends, maximizing expected payment for every starting position. | Hard8 | Dynamic programmingMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Trodden CablePlace a cable along grid edges connecting two given corners so that, over repeated fixed walks, staff cross it as few times as possible. | Hard8 | Shortest pathGraph+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Endless BFSRun a BFS that forgets visited vertices, so the active set alternates between bipartition classes. Decide whether it ever equals all vertices and report the least step when it does. | Hard8 | GraphBFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Librarian's WorkGiven a shuffled permutation with book weights, restore the original order using two adjacent-rotation-like moves and minimize total labor cost. | Hard8 | GreedyDynamic programming+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Permutation PeriodStarting from the identity permutation, apply swaps one at a time and after each swap report the permutation's period modulo 1e9+7, where the period is the LCM of its cycle lengths. | Hard8 | MathNumber theory+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Clique ColoringGiven up to five clique sizes, find the smallest number of vertices in a complete graph whose edges can be covered by cliques of those sizes with no repeated edge. | Hard8 | CombinatoricsMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| DifferenceBuild the sequence from A1 incrementally, adding each next gap so that m hits as a value or an existing difference; report the first step that covers it. | Hard8 | SimulationMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Sequential YahtzeeGiven up to 195 sequential dice rolls, assign consecutive segments to the 13 Yahtzee categories in order to maximize the total score. | Hard8 | Dynamic programmingPrefix sum+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Knight GameTwo players alternately place non-attacking knights on an N x N board; decide who wins under optimal play, with N up to 10,000. | Hard8 | Game theoryMath+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Distinct Substring Queries 2Process a stream of append-character and count-distinct-substrings queries on a growing string, answering each count query online. | Hard8 | StringString matching+2 | No attempts yet | 1s | 512 MB | Judgeable |
| String FoldingFold the string at a sequence of positions into vertical columns, then find the longest column-run of one repeated character that starts at the bottom with no gaps. | Hard8 | StringBrute force+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Number of Integer Lattice PointsCount pairs of lattice points in a grid whose connecting segment contains exactly K lattice points. | Hard8 | MathNumber theory+2 | No attempts yet | 2s | 512 MB | Judgeable |
| MaaaaaaaaazeGiven five 5x5 boards, rotate each freely, stack them in any order, then find the shortest path through the resulting 5x5x5 cube from one corner to the opposite corner. | Hard8 | Brute forceBFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Rope and QueriesMaintain a string under up to 100,000 queries that cut a substring and move it to the front or back, and print single characters. | Hard8 | Linked listImplementation+2 | No attempts yet | 0.3s | 512 MB | Judgeable |
| 3-SAT 2Given a 3-CNF formula with N variables and M clauses, decide whether it is satisfiable and, if so, output a satisfying assignment. | Hard8 | GraphDFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Artifact RestorationGiven a grid with some unknown cells, fill unknowns with 0 or 1 so that the total number of people summed over all subrectangles is divisible by K. | Hard8 | MathNumber theory+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Broken DataDelete some integers from a sequence so the rest reads as N M U1 V1 ... UM VM with 1 <= Ui,Vi <= N; among all valid restorations, maximize N, then M. | Hard8 | ImplementationGreedy+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Truth TellersGiven N people each stating a range for the number of truth tellers, find the maximum consistent truth-teller count after each of Q point updates. | Hard8 | ArraySegment tree+2 | No attempts yet | 3.5s | 256 MB | Judgeable |
| SEGWAYSimulate N riders over a 300 m track with three speed sections and accelerators granting 1 s/m boost for X mod 20 meters, where X counts riders strictly ahead, and print each finish time. | Hard8 | SimulationImplementation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Whiskey TradeModel the distribution network as a flow graph with node capacities and compute the maximum flow from Myeongjin to Jueun. | Hard8 | GraphShortest path+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Overflowing PopularityGiven M guests with arrival and departure times, choose when to insert up to K extra friends so that the count of ordinary attendees stays below T as long as possible. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 256 MB | Judgeable |
| The Valley OverflowsGiven a tree of valleys with heights, decide whether water starting from any non-K valley can reach valley K under the splash-up movement rule. | Hard8 | TreeDFS+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Card Factory (Large)Each of N cards shows its front initially; given M queries K that flip every card whose visible number is at most K, report the final visible sum. | Hard8 | SortingBinary search+2 | No attempts yet | 3s | 256 MB | Judgeable |
| Making Everything WhiteGiven an N by M black/white grid, choose for each cell one of three local color-inversion actions so that every cell ends up white, or report impossibility. | Hard8 | GreedyImplementation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Superb DartGiven a planar straight-line graph, list the areas of its bounded faces in increasing order, rounded to two decimals. | Hard8 | GeometryGraph+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Random Number GeneratorSimulate a quadratic-polynomial generator to build a grid, then find the path from top-left to bottom-right whose sorted values are lexicographically smallest. | Hard8 | SimulationGreedy+2 | No attempts yet | 3s | 256 MB | Judgeable |
| Plants vs. ZombiesGiven a grid of plants, each with a score and an attack range, zombies enter from the right and can eat a plant only after clearing the plants to its right, but eating a plant that any surviving plant covers is fatal; maximize total score. | Hard8 | GraphTopological sort+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Pipe MarblesGiven two binary strings as stacks, count the sum of squares of the number of interleavings producing each distinct output string, modulo 1024523. | Hard8 | Dynamic programmingString+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Masquerade PartyGiven directed visibility edges between masks, find the maximum and minimum possible number of mask types k (at least 3) consistent with the observations. | Hard8 | GraphUnion-find+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Sequence and Queries 24Maintain an array under point updates and range queries that ask for the largest sum of two distinct elements within a subarray. | Hard8 | Segment treeDynamic programming+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Overflowing Gift CardsGiven each card's days until expiry and the day he plans to use it, find the fewest 30-day extensions so every card is still valid when used, under a rule that he must always use the card closest to expiry. | Hard8 | GreedySorting+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Overflowing BanknotesFor each query, after updating one node, find the maximum banknotes that can be gathered at one safe when any node is chosen as root and the coins fall optimally. | Hard8 | TreeDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Function Composition and QueriesGiven a function f on 1..m, answer queries n, x by returning the value of the n-fold composition f^n(x). | Hard8 | Binary searchGraph+2 | No attempts yet | 1s | 512 MB | Judgeable |
| kdh9949Find the longest path in an undirected graph whose vertex labels spell repeated KDH blocks, or report -1 if such a path can be infinite. | Hard8 | GraphDynamic programming+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Tree Colors and QueriesA rooted tree where edges are deleted over time; after each deletion, count distinct colors among vertices still reachable from a queried vertex. | Hard8 | DFSTree+2 | No attempts yet | 2s | 256 MB | Judgeable |
| Building Bridges 2On a small grid, connect all islands with straight length-2+ bridges over sea so the total bridge length is minimized, or print -1. | Hard8 | GraphMinimum spanning tree+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Sequence and Queries 25Maintain an array under range bitwise AND, range bitwise OR, and range maximum queries, each value below 2^20. | Hard8 | Segment treeBit manipulation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Sequence and Queries 28Maintain an array under range add, range floor-sqrt, and range sum queries, and report each range sum. | Hard8 | Segment treeMath+2 | No attempts yet | 1s | 512 MB | Judgeable |
| BorderGiven an N by N grid of species (N at most 4), find a non-self-crossing border path from the top-left to the bottom-right corner so that different species end up in separate regions, or report that none exists. | Hard8 | GraphBrute force+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Hilbert's HotelSimulate Hilbert's Hotel as guests arrive in finite or infinite groups, and answer which group occupies a room or which room holds a given index of a group. | Hard8 | MathImplementation+2 | No attempts yet | 1.5s | 1024 MB | Judgeable |
| Lexicographically Minimum WalkFind the lexicographically smallest color sequence among all walks from S to T of length at most 10^100, reporting IMPOSSIBLE or TOO LONG when needed. | Hard8 | GraphGreedy+2 | No attempts yet | 2s | 1024 MB | Judgeable |
| All You Need is DatingGiven bipartite preferences and per-student min/max date counts, find the maximum number of dates satisfying all lower and upper bounds, or -1. | Hard8 | GraphDynamic programming+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Dishonest DriverGiven a string of N characters, find the size of the shortest compressed form built from single characters, concatenation, and repetition (C repeated k times). | Hard8 | Dynamic programmingString+2 | No attempts yet | 6s | 512 MB | Judgeable |
| Running RoutesGiven chords of a convex n-gon, find the largest set of chords no two of which share any common point, including endpoints. | Hard8 | Dynamic programmingIntervals+2 | No attempts yet | 12s | 1024 MB | Judgeable |
| Sequence and Queries 31Maintain a 0/1 sequence under range reversals, and answer queries for the longest run of 1s inside a given range. | Hard8 | Segment treeIntervals+2 | No attempts yet | 2s | 512 MB | Judgeable |
| DroneA drone moves on an N x N tile maze with walls; LED tiles light up in sequence order as the drone steps on them, and we need the shortest total travel time to display the whole sequence and exit. | Hard8 | BFSShortest path+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Strange MachineCount the distinct pairs (x, y) produced by the map t -> (((t + floor(t/B)) mod A), t mod B) over n disjoint time intervals. | Hard8 | MathNumber theory+2 | No attempts yet | 4s | 512 MB | Judgeable |
| SeparatorAppend values one at a time to a growing sequence and after each append report how many indices are separators, meaning every earlier element is smaller and every later element is larger. | Hard8 | TreeImplementation+2 | No attempts yet | 1.2s | 512 MB | Judgeable |
| NamuhsGiven N unknown planet potentials, find the unique contiguous segment with the maximum sum using only queries that compare the sums of two segments. | Hard8 | Divide and conquerBinary search+2 | No attempts yet | 2s | 512 MB | Judgeable |
| ResistancePlayers leave and return over time; after each change report the maximum value of a split into two teams, where friendship edges crossing the split are lost. | Hard8 | GraphMinimum spanning tree+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Cake 3Choose M of N slices and arrange them in a cycle to maximize total value minus the sum of absolute color-depth differences around the cycle. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 4s | 256 MB | Judgeable |
| MineralsGiven 2N slices forming N unknown pairs, determine all pairs using at most 1,000,000 device operations that report the number of distinct mineral kinds currently inserted. | Hard8 | Divide and conquerImplementation+2 | No attempts yet | 1s | 256 MB | Judgeable |
| TentsCount nonempty subsets of tents on an H by W grid with directions obeying monotone entrance rules in every row and column, modulo 1e9+7. | Hard8 | CombinatoricsDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| LibraryGiven a hidden permutation of N books, query the oracle with a set of book numbers and receive the minimum number of contiguous-block removals needed to extract exactly those books, then recover the order. | Hard8 | IntervalsMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Copy and Paste 2Simulate N copy-and-paste edits on a string capped at length M, tracking positions backward so the first K characters of the final string can be printed. | Hard8 | ImplementationBinary search+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Making Friends is FunGiven a directed graph of ambassador arrows, repeatedly pick a mediator x and two countries p,q with arrows (x,p) and (x,q), then add (p,q) and (q,p); maximize final arrow count. | Hard8 | GraphUnion-find+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Collecting Images is FunStart with an all-white 2^N by 2^N grid; after each of Q row or column flips, report the size of the quadtree that represents the image. | Hard8 | Divide and conquerImplementation+2 | No attempts yet | 5s | 256 MB | Judgeable |
| MascotsCount the orders of placing the remaining mascots so that the number of steps where the occupied cells form a full rectangle is maximized, modulo 1e9+7. | Hard8 | CombinatoricsDynamic programming+2 | No attempts yet | 2s | 256 MB | Judgeable |
| ChampionshipsFind the largest set of vertices in an undirected graph that is connected and where every vertex has at least d neighbors inside the set. | Hard8 | GraphImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| JOI FlagFill and fix a 2^K by 2^K grid so it follows the recursive quadrant rule for JOI flags, minimizing the number of already-written cells whose character must change. | Hard8 | Divide and conquerDynamic programming+2 | No attempts yet | 3s | 512 MB | Judgeable |
| Estate AgentGiven directed offers between families with amounts, pick a subset of disjoint cycles so the total sum of offer amounts is maximized, then output 5% of it. | Hard8 | GraphDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Grand Central StationGiven a tree, find the minimum number of distinct map designs (rooted drawings) such that every vertex can be the center of one design after relabeling. | Hard8 | TreeDFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Hat StandPlace c-1 spare hats on hooks so the total walking distance over a given sequence of n hats is minimized, then output the best arrangement. | Hard8 | GreedyDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Dice YutnoriGiven 10 die rolls, move one of four pieces around a branching Yutnori board each turn and maximize the score collected from numbered squares. | Hard8 | BacktrackingSimulation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Lion and RabbitCount the ordered pairs of distinct vertices in a connected undirected graph for which the lion can never catch the rabbit under simultaneous blind moves. | Hard8 | GraphBFS+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Cheese, If You PleaseGiven limited pounds of n cheese types and m blends with fixed percentage recipes and per-pound profits, find the maximum achievable profit and round it to the nearest cent. | Hard8 | MathGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Just Passing ThroughGrid path from the west edge to the east edge moving east, northeast, or southeast, crossing exactly n passes, minimizing total elevation. | Hard8 | Dynamic programmingMatrix+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Where Have You Bin?Given a row of bins labeled by company, delete the listed bins, add the requested new bins, and find the minimum total item cost to keep every company's bins contiguous. | Hard8 | Dynamic programmingImplementation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Integers in Rational BasesGiven coprime p and q, write a positive integer n in the unique base p/q expansion whose digits are all at most p-1, printing digits 0-9, A-Z, a-z. | Hard8 | Number theoryMath+2 | No attempts yet | 1s | 512 MB | Judgeable |
| HogwartsGiven two edge-labelled 4-out graphs on n rooms, decide whether every instruction sequence that walks from room 1 to room n in the old graph also walks from 1 to n in the new graph. | Hard8 | GraphBFS+2 | No attempts yet | 1s | 512 MB | Judgeable |
| MoleculesGiven a connected graph with some vertex positions fixed, find positions for the rest so each unknown vertex sits at the average of its neighbors; any valid solution is accepted. | Hard8 | GraphMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Pairing SocksGiven a sequence of 2n socks, find the minimum number of moves to pair all socks using two stacks with three allowed operations, or report impossible. | Hard8 | StackGreedy+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Tree HuggingGiven 2(n-1) edges on n points, decide whether they can be split into a left-rooted increasing tree and a right-rooted decreasing tree, and output one such labeling. | Hard8 | GraphGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Counting Permutations with a Given Greedily Increasing SubsequenceCount the permutations of 1 to N whose greedily increasing subsequence equals a given sequence G, modulo 1e9+7. | Hard8 | CombinatoricsMath+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Ranch CCTVFor each query, sheep in a grid shift one cell per day in a fixed direction for K days; report the XOR of the daily maximum over the CCTV rectangle. | Hard8 | Prefix sumMatrix+2 | No attempts yet | 2s | 256 MB | Judgeable |
| Max or MinGiven numbers on a circle and min/max operations over a value and its two neighbors, find for each x the least minutes to make all values equal x, or -1. | Hard8 | ImplementationGreedy+2 | No attempts yet | 1s | 256 MB | Judgeable |
| EquilibriumGiven a tree, order its vertices to minimize the sum over vertices of the absolute difference between neighbors placed after and before them. | Hard8 | TreeDFS+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Computer CacheMaintain a mutable byte array over m pieces, support range increments modulo 256 on a piece, cache loads of whole pieces into fixed cache positions, and point queries of cache bytes. | Hard8 | Segment treeArray+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Glow, Pixel, Glow!Given horizontal and vertical pulses crossing a grid of wires, count the pixels where current passes through both intersecting wires at the same time. | Hard8 | SortingImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Cocoa CoalitionBreak an n by m chocolate bar with straight-line cuts into pieces that can be grouped into one pile of a cells and one of b cells, minimizing the number of cuts. | Hard8 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Cut Inequality DownFor many range queries [B,E] and starting wealth X, simulate monthly income with wealth clamped into [L,U] after each month and report the final wealth. | Hard8 | Segment treeImplementation+2 | No attempts yet | 0.7s | 512 MB | Judgeable |
| Dazzling StarsGiven N stars with coordinates and brightness, decide whether some rotation of the picture makes brighter stars print no later than dimmer ones, where printing goes top to bottom. | Hard8 | GeometrySorting+2 | No attempts yet | 0.2s | 512 MB | Judgeable |
| Game of Falling BlocksSimulate a simplified Tetris game that uses bag randomization of the seven tetrominoes, and decide for each piece where to place it to complete at least one row before the game is lost. | Hard8 | SimulationGreedy+2 | No attempts yet | 1s | 512 MB | Judgeable |
| PopcountGiven N and K, produce a MalnarScript program of at most K commands that computes the popcount of an N-bit input using one variable. | Hard8 | Bit manipulationDivide and conquer+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Great Farmer Kim SanghyukChoose a radius r to maximize the daily profit from crops inside the circle (each worth wi times its distance to the boundary) minus the management cost A*r^2. | Hard8 | GeometryMath+2 | No attempts yet | 2s | 1024 MB | Judgeable |
| Optimal SelectionGiven n <= 8 numbers and some known pairwise order relations, find the worst-case minimum number of comparisons an optimal comparison-based algorithm needs to output the k-th smallest. | Hard8 | Divide and conquerGame theory+2 | No attempts yet | 8s | 1024 MB | Judgeable |
| True/False WorksheetCount binary strings of length n that satisfy range hints, where each hint says a range is all equal or not all equal, modulo 1e9+7. | Hard8 | Dynamic programmingPrefix sum+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Sink the Billiard BallA point ball bounces off the edges of an A by B table with velocity (p,q); count edge hits until it reaches a corner, or print -1 if it never stops. | Hard8 | MathNumber theory+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Who Has Not Read the Message?Given each message's sender and the count of people who had not read it, count the possible sets of unread people per message, modulo 1e9+7. | Hard8 | CombinatoricsDynamic programming+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Water Tanks of Seongdae CountryA tree of water tanks rooted at a capital. Adding water at city A adds 1,2,3,... along the root-to-A path. Answer queries about how much water a given city currently holds. | Hard8 | TreeDFS+2 | No attempts yet | 1s | 256 MB | Judgeable |