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,705 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Polly Wants a CrackerMatch each spoken word to a distinct original word minimizing total Levenshtein edit distance, and report that minimum sum. | Medium7 | Dynamic programmingString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Shuriken GameTwo players remove 1 to N shurikens from a pile, but a player cannot repeat the opponent's previous move; find the smallest winning first move. | Medium7 | Dynamic programmingGame theory+1 | No attempts yet | 1s | 128 MB | Judgeable |
| EvolutionGiven N DNA strings linked in an unknown parent-child order, compute each creature's probability of being the original ancestor. | Medium7 | ProbabilityBit manipulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Serial NumberGiven distinct serial numbers and a modulus M, choose the largest subset whose sum is a multiple of M. | Medium7 | Dynamic programmingNumber theory | No attempts yet | 3s | 128 MB | Judgeable |
| Flipping NetworksMaintain an undirected graph under edge toggle operations and count, after every flip, how many hosts are reachable from host 1 but only by paths longer than 10 hops. | Medium7 | GraphBFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| MondriaanGiven non-overlapping rectangles that tile a big rectangle, count the 3-colorings of the adjacency graph where orthogonally touching regions differ and white is a fourth free option. | Medium7 | GeometryGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Nim/3Three-player Nim where each player has a preferred winner; find player 1's optimal move with smallest stack then smallest count. | Medium7 | Game theoryDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| MerchantChoose a subset of markets to visit in nondecreasing opening-day order along a river, starting and ending at home, to maximize profits minus asymmetric upstream/downstream fuel costs. | Medium7 | Dynamic programmingSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| MinersAssign each of N shipments in order to one of two mines; each shipment scores 1 to 3 based on how many distinct kinds appear among it and the previous two shipments at that mine, and the goal is to maximize the total. | Medium7 | Dynamic programmingString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Valley of MexicoGiven a graph on cities placed in convex position, find a crossing-free Hamiltonian path (visiting every vertex once) that is lexicographically smallest, or report none. | Medium7 | GraphDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| HermesHermes walks on an infinite grid and must, in order, reach either the row or the column of each given point, starting at the origin; find the minimum total travel distance. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Comparing CodeFind the longest run of HAL's lines that matches a run of RBN's lines up to injective variable renaming and swapping the two right-hand operands. | Medium7 | String matchingHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Post OfficePlace P post offices in some of V villages on a line so that the sum of each village's distance to its nearest post office is minimized. | Medium7 | Dynamic programmingPrefix sum+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Run, IOI TrainDiscard a prefix from each of two I/O strings, then interleave the remaining fronts to build the longest alternating string that starts and ends with I. | Medium7 | Dynamic programmingTwo pointers+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Night MarketChoose an increasing-index subset of stalls, each with a non-overlapping integer start time before T, so that no play interval strictly contains time S, maximizing total fun. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Airplane ParkingGiven N time intervals (arrival, departure), find the largest subset that can be scheduled in a stack, so planes leave in last-in first-out order. | Medium7 | Dynamic programmingIntervals+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Your WaysCount monotone lattice paths from (0,0) to (W,H) modulo 2552 for K days, where each day blocks up to 100 unit street/avenue segments with no two blocked segments on a common monotone path. | Medium7 | Dynamic programmingCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Arranging HeapsGiven N heaps at increasing positions with weights, merge them into exactly K heaps where each heap moves only downriver, minimizing total weight times distance moved. | Medium7 | Dynamic programmingDivide and conquer+2 | No attempts yet | 2s | 128 MB | Judgeable |
| String FarmGiven up to 10^4 strings, find the longest chain where each string is a contiguous substring of the next, all photos distinct. | Medium7 | StringDynamic programming+2 | No attempts yet | 5s | 128 MB | Judgeable |
| Hyperactive Boy GangsanCount minimal subsets of intervals that cover [0, M] with no redundant interval, modulo 10^8, over multiple test cases. | Medium7 | Dynamic programmingIntervals+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Almost Shortest PathRemove every edge that lies on any shortest S to D path, then find the shortest remaining path from S to D, or report -1. | Medium7 | Shortest pathGraph+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Candy Picking ContestChoose boxes in an M by N grid so no two chosen boxes touch vertically or horizontally, maximizing the total candies collected. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Emoticons :-)Given a set of emoticon strings, replace the fewest characters with spaces across several text lines so that no emoticon appears consecutively in any line. | Medium7 | String matchingDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Turkish RoulettePlace B ordered balls into B non-overlapping pairs of adjacent wheel slots to maximize the dealer's profit, where each ball's value is its number times the sum of its two slots. | Medium7 | Dynamic programmingArray+2 | No attempts yet | 3s | 128 MB | Judgeable |
| P-NetworksGiven a permutation of N wires, decide whether a p-network can realize it, and if so report the minimum number of strokes needed. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Land Division TaxSplit a ring of N lots one at a time; each split costs F times the larger resulting piece. Find the minimum total tax. | Medium7 | Dynamic programmingIntervals+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Two-Stacks SolitaireGiven a stock pile dealt in order, decide whether the top card can be moved to intermediate pile 1 or 2 or popped to the foundation so all cards end non-decreasing. | Medium7 | Dynamic programmingStack+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Uncle Tom's Inherited LandGiven a grid where at most 50 squares are usable land and the rest are ponds, find the maximum number of 1x2 dominoes that tile the usable squares. | Medium7 | GraphDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Help-or-elseChoose an ordered subset of people to help; the finish time of each helper accumulates, and unhelped people add a penalty, so find the largest feasible subset under budget K. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Oil SkimmingGiven an N by N grid of oil cells, choose as many non-overlapping horizontal or vertical adjacent pairs of oil cells as possible. | Medium7 | GraphDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Parachute RingsProcess link operations on a growing undirected graph and, after each query, count the vertices whose removal leaves only paths (or nothing). | Medium7 | GraphUnion-find+2 | No attempts yet | 3s | 128 MB | Judgeable |
| The Cow RunCows sit at distinct positions on a line; John starts at 0, moves one unit per minute, and each cow costs one dollar per minute until reached. Minimize the sum of arrival times. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| NecklaceGiven a string and a pattern, delete the fewest characters so the pattern no longer appears as a contiguous substring. | Medium7 | Dynamic programmingString matching+2 | No attempts yet | 1s | 128 MB | Judgeable |
| BookshelfPartition the books, in order, into shelves of total width at most L to minimize the sum of each shelf's max height. | Medium7 | Dynamic programmingSegment tree+1 | No attempts yet | 1s | 128 MB | Judgeable |
| RelocationGiven an undirected weighted graph with up to 5 market towns, pick a non-market town as home and an order to visit all markets and return, minimizing total distance. | Medium7 | Shortest pathGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Threatening LetterGiven a newspaper string and a message, split the message into the fewest contiguous pieces, each of which appears somewhere in the newspaper. Output that minimum count. | Medium7 | StringDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| CowlphabetCount valid words over 52 letters with exactly U uppercase and L lowercase letters, given the allowed adjacent letter pairs, modulo 97654321. | Medium7 | Dynamic programmingCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Generic Cow ProtestsCount the ways to split a sequence into contiguous groups so that every group sum is nonnegative, modulo 1,000,000,009. | Medium7 | Dynamic programmingPrefix sum+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Tree DecorationPlace a minimum-cost number of ornaments on each node of a rooted tree so every subtree holds at least its required count, given per-node unit costs. | Medium7 | TreeGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SolderingGiven a tree, cover its edges with paths (wires) that may meet at soldered points, minimizing the sum of squared path lengths. | Medium7 | TreeDynamic programming+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Forgotten PasswordFind the lexicographically smallest length-L string that matches a pattern of known letters and '?' and can be written as a concatenation of given dictionary words. | Medium7 | Dynamic programmingString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Job HuntBessie earns at most D per city visit, travels free paths and paid flights, and can repeat cities; find the maximum total profit or -1 if unbounded. | Medium7 | GraphShortest path+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Cheese TowersStack unlimited cheese blocks up to total height T; any block of height at least K crushes everything below it to 4/5 height, maximizing total value. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Toy ShoppingSelect three of N toys maximizing the sum of joy/price ratios, and output the total price plus the three indices sorted by ratio. | Medium7 | SortingGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Cow PoliticsGiven a tree with each node belonging to one of K parties, find the diameter (greatest distance between any two nodes) of the nodes in each party. | Medium7 | TreeDFS+2 | No attempts yet | 2s | 128 MB | Judgeable |
| The Baric BovineChoose the smallest subset of N pressure readings so the total interpolation-style error stays within E, and report that size plus the least error for it. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Pumps and PipesPlace the fewest pumps along a 20 m per pipe water line so pressure stays within limits, choosing the lexicographically smallest position set. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The LeprechaunGiven an N x N matrix on a torus, find the contiguous circular run along any row, column, or either diagonal with the largest sum. | Medium7 | ArrayDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| RestaurantSplit a sequence of N foods into consecutive groups, where a group costs the square of its number of distinct foods, and minimize the total cost. | Medium7 | Dynamic programmingDivide and conquer+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Ski LessonsGiven ski lessons that overwrite Bessie's skill at fixed start times and slopes with skill and time costs, maximize the number of runs by time T. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Spreading Out the CowsPlace N cows into S stalls so adjacent gaps are D or D+1 with as many D as possible, minimizing total movement from given start positions. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Random WalkParse a small random program with procedures and threshold IF/GOTO or PROC commands, then compute each requested procedure's expected running time to three decimals. | Medium7 | ProbabilityGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Summing SumsEach round every cow replaces her number with the sum of the other cows' numbers mod 98765431; report the values after exactly T rounds. | Medium7 | MathMatrix+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Bovine Accordion and Banjo OrchestraChoose increasing pairs between two length-N sequences to maximize the sum of A_i*B_j minus the squared sums of each maximal block of unpaired elements on both sides. | Medium7 | Dynamic programmingPrefix sum+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Cow JoggingGiven a DAG with edges pointing from higher to lower numbered nodes, report the K shortest path lengths from node N to node 1, with duplicates allowed. | Medium7 | GraphDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Corn FieldsCount subsets of fertile cells in an M by N grid, M,N at most 12, with no two chosen cells sharing an edge, modulo 100000000. | Medium7 | Dynamic programmingBit manipulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Fewest CoinsGiven coin denominations, bounded supplies that John holds, and unlimited shopkeeper change, find the minimum total number of coins exchanged so John pays at least T with exact change returned. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Problem SolvingGiven a monthly budget M and per-problem advance and completion payments, find the minimum number of months to solve all P problems in order, where each month spends at most the previous month's budget. | Medium7 | Dynamic programmingGreedy | No attempts yet | 1s | 128 MB | Judgeable |
| DiningEach cow likes certain foods and drinks, each item can go to one cow; maximize the number of cows that get a liked food and a liked drink. | Medium7 | GraphDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Corrupted BSTGiven a binary tree with distinct integer keys, find the minimum number of node keys to change so the tree satisfies the BST ordering, keeping its shape fixed. | Medium7 | TreeDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Islands and BridgesFind the maximum score of a Hamilton path on a graph where the score adds vertex values, edge products, and triangle products, and count how many paths achieve it. | Medium7 | Dynamic programmingBit manipulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Palindrome-Free NumbersCount integers in [a, b] whose decimal representation has no palindromic substring of length 2 or more. | Medium7 | Dynamic programmingImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| VimGiven a string over a-j, find the minimum Vim keypresses (x, h, and f C) to delete every 'e' without touching other characters, starting with the cursor at index 0. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| FamilyCompute the expected percentage of genes shared by pairs of monsters in a given family graph where each child inherits each gene from one parent at random. | Medium7 | GraphDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Water Treatment PlantsFor each given number of cities NC, count the valid strings of V, <, and > that respect the pipe-sharing rules, where NC can reach 100. | Medium7 | Dynamic programmingCombinatorics+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Fast FoodGiven sorted restaurant positions, choose k of them as depots to minimize the total distance from every restaurant to its nearest depot. | Medium7 | Dynamic programmingDivide and conquer+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Single-Player GamesGiven mutually recursive game-tree definitions, find each identifier's expected score under uniform random play, or report it undefined when the game may never end. | Medium7 | ProbabilityMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Number GameGiven the numbers still allowed by previous choices, list every move that leaves the opponent in a losing position, or report that none exists. | Medium7 | Game theoryDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Formatting TextBreak a paragraph into lines of fixed width, choosing line breaks to minimize total badness with a lexicographic tie-break on gap widths. | Medium7 | Dynamic programmingString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Unimodal Palindromic DecompositionsCount the number of ways to write N as a sum of a palindromic sequence whose values rise to the middle then fall. | Medium7 | Dynamic programmingCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| To the MaxFind the contiguous rectangular subregion of an N by N integer matrix with the largest possible sum and print that sum. | Medium7 | Dynamic programmingArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Cog-WheelsGiven a set of cog sizes where every size is a multiple of the smallest, decide for each ratio a:b whether it can be realized by chaining products of available sizes. | Medium7 | Number theoryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| StampsFor each h and k with h+k<=9, find k stamp values whose at-most-h sums cover 1..n consecutively for the longest range, then print the lexicographically smallest such set and n. | Medium7 | Dynamic programmingBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Making ChangeFor each transaction, find the fewest total coins exchanged when you pay with your limited coins and the shopkeeper returns change using unlimited coins. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Another LotteryEach of n players buys tickets across m rounds; round j pays 2^j to one random ticket. For each player, print the reduced fraction for the probability of winning strictly more money than everyone else. | Medium7 | ProbabilityMath+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Elias Gamma CodeGiven counts of numbers by binary bit length, choose prefix shifts and optional leading zeros to minimize the total encoded length. | Medium7 | Dynamic programmingGreedy | No attempts yet | 1s | 128 MB | Judgeable |
| Help BobGiven up to 15 pizzas with prices, areas, and stacked discount coupons unlocked by buying other pizzas, find the minimum total price over total area of any nonempty purchase order. | Medium7 | Dynamic programmingBit manipulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| All Discs ConsideredGiven a DAG of package dependencies split across exactly two DVDs, find the minimum number of disc changes to install all packages with a single drive. | Medium7 | GraphTopological sort+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Huffman's GreedWe build the optimal binary search tree for weighted key and gap frequencies, minimizing weighted comparison counts. | Medium7 | Dynamic programmingTree+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Phylogenetic Trees InheritedGiven leaf sequences of a complete binary tree, label internal nodes to minimize the sum of Hamming distances along edges, and output the lexicographically smallest optimal root sequence with its cost. | Medium7 | Dynamic programmingTree+2 | No attempts yet | 1s | 128 MB | Judgeable |
| New FruitFor each pair of strings, output the shortest common supersequence, breaking ties by choosing the lexicographically smallest one. | Medium7 | Dynamic programmingString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Bus Clock DisplayGiven up to 100 partial 7-segment clock readings with min and max elapsed minutes between consecutive readings, determine the time at each reading or report how many possibilities remain. | Medium7 | Dynamic programmingBit manipulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Hack around the LockStarting from a given K-digit lock setting, find the minimum number of single-wheel rotations needed to visit every other K-digit setting at least once. | Medium7 | GraphMath+2 | No attempts yet | 5s | 256 MB | Judgeable |
| Divisors of a Binomial CoefficientFor each pair n and k, count the distinct divisors of the binomial coefficient C(n, k), where n is at most 431. | Medium7 | Number theoryMath+2 | No attempts yet | 1s | 256 MB | Judgeable |
| IVXLCDMGiven a lowercase inscription line, find the largest value of a valid Roman numeral readable as a subsequence of its letters, or 0 if none. | Medium7 | GreedyString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Formatting TextGiven words and a target width, break the text into lines to minimize total gap badness, with a penalty of 500 for any line holding one word. | Medium7 | Dynamic programmingGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| S-NimGiven a move set S, decide for each position whether the S-Nim game is a win or a loss by computing Grundy numbers and XORing them over the heaps. | Medium7 | Game theoryDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Lazy and Strict EvaluationGiven function definitions in a small Lisp-like language, count how many times each arithmetic operation runs under lazy (memoized) versus strict evaluation, skipping non-terminating tests. | Medium7 | ImplementationRecursion+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TouristOn a grid with blocked cells, find two monotone paths (down-right then up-left) maximizing the number of distinct interesting cells visited. | Medium7 | Dynamic programmingMatrix+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Mailbox Manufacturers ProblemWith k identical mailboxes usable up to m firecrackers, find the minimum worst-case cost in firecrackers to pin down exactly how many each can survive. | Medium7 | Dynamic programmingBinary search+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Bridge PlacementsPlace k horizontal bridges between two skyscrapers of given heights to minimize total stairs over all ordered floor pairs, breaking ties with the lowest placement. | Medium7 | Dynamic programmingGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| A Fair JuryPick exactly m candidates from a pool, minimizing |total defense minus total prosecution|, then maximizing the combined total among those juries. | Medium7 | Dynamic programmingArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Co-workers from HellPlace tricks in chambers so the watchman's walk, where each trick is used once to change dwell time and jump target, maximizes total time before he normally finishes chamber n. | Medium7 | Dynamic programmingGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Factor SolitaireStarting from 1, repeatedly replace c by c + a where a divides c and b = c/a, paying b; find the minimum total cost to reach N. | Medium7 | Dynamic programmingNumber theory+2 | No attempts yet | 1s | 128 MB | Judgeable |
| LHCGiven a tree, find the maximum cycle length obtainable by adding one edge, and count the vertex pairs that achieve it. | Medium7 | TreeDFS+2 | No attempts yet | 2s | 512 MB | Judgeable |
| RepetitivityCompute the sum of squared occurrence counts over all distinct subsequences of a string, modulo M. | Medium7 | StringDynamic programming+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Mhocskian LanguagesGiven a context-free grammar in Chomsky normal form and a list of words, decide for each word whether the start variable can derive it. | Medium7 | Dynamic programmingString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Editor DistanceGiven the character counts of N lines up to 80 wide, find the fewest arrow-key presses to move a cursor from a start position to a finish position, where vertical moves clamp to each line's end. | Medium7 | GraphShortest path+2 | No attempts yet | 2s | 512 MB | Judgeable |
| DinnerGiven a line of G and H programmers, repeatedly remove a run of at least K equal letters; find the minimum number of removals to clear the line, or -1. | Medium7 | Dynamic programmingIntervals+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Bowling for Numbers++Choose at most k windows of length w, possibly overlapping beyond the row ends, so the sum of the covered pins is as large as possible. | Medium7 | Dynamic programmingPrefix sum+2 | No attempts yet | 1s | 128 MB | Judgeable |