2300 - 2399
Solutions categorised by Problem IDs
2300 - Successful Pairs of Spells and PotionsCount potions that form a successful pair with each spell by binary searching the minimum qualifying potion strength.2302 - Count Subarrays With Score Less Than KCount subarrays whose sum times length stays below k by maintaining a sliding window with a running sum.2331 - Evaluate Boolean Binary TreeEvaluate a Boolean binary tree by recursively applying each internal node's operator to its children's results.2351 - First Letter to Appear TwiceFind the earliest second occurrence of a letter by tracking which characters have already appeared.2352 - Equal Row and Column PairsCount equal row-column pairs in a square grid by mapping complete sequences to their occurrence counts.2354 - Number of Excellent PairsCount excellent ordered pairs by using set-bit counts to test the combined contribution of bitwise AND and OR.2357 - Make Array Zero by Subtracting Equal AmountsFind how many subtractions it takes to zero an array by counting its distinct positive values.2358 - Maximum Number of Groups Entering a CompetitionFind the maximum number of student groups by analyzing how the required group sizes increase.2359 - Find Closest Node to Given Two NodesFind the common reachable node that minimizes the larger distance from two starts by comparing their distances to each node.2360 - Longest Cycle in a GraphFind the longest directed cycle in a graph with at most one outgoing edge per node using strongly connected components.2373 - Largest Local Values in a MatrixBuild a matrix of local maxima by checking each three-by-three window in the original grid.2376 - Count Special IntegersCount positive integers with distinct digits up to a limit using digit dynamic programming and a mask of used digits.2379 - Minimum Recolors to Get K Consecutive Black BlocksFind the fewest white blocks to recolor by counting white blocks in candidate runs of length k.2380 - Time Needed to Rearrange a Binary StringSimulate simultaneous swaps of adjacent zero-one pairs and count the seconds until the binary string stabilizes.2381 - Shifting Letters IIApply overlapping letter shifts by sweeping range updates and accumulating their net effect at each character.2383 - Minimum Hours of Training to Win a CompetitionMinimize training time by tracking the energy and experience needed to beat each opponent in order.2384 - Largest Palindromic NumberBuild the largest palindromic number from digit counts by placing matching pairs around the best available center.2392 - Build a Matrix With ConditionsConstruct a matrix satisfying row and column constraints by topologically sorting the two independent sets of precedence rules.