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,769 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Flipping CoinsCount the heads and tails and flip the coins on the less frequent side so all coins show the same face. | Easy1 | GreedyArray | No attempts yet | 1s | 128 MB | Judgeable |
| Choosing subjectsPick the three highest scores among the four science subjects and the higher of history and geography, then print their sum. | Easy1 | GreedySorting | No attempts yet | 2s | 512 MB | Judgeable |
| The group project starts and the team leader is goneGiven a distance L, Sungwoo covers 1 to 5 per minute; print the smallest integer number of minutes needed to reach Mingeon. | Easy1 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Barn LotteryGiven N cows and a W by H barn, find how many L by L square spaces fit inside the barn, capped at N. | Easy1 | MathImplementation+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Chicken CouponsGiven n chicken coupons and a stamp-to-coupon exchange rate k, compute the maximum chickens obtainable by repeatedly redeeming stamps for new coupons. | Easy2 | MathSimulation+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Packing Books into BoxesGiven book weights in order and a per-box weight limit, compute the minimum number of boxes needed by greedily filling each box in sequence. | Easy2 | GreedyArray+1 | No attempts yet | 2s | 128 MB | Judgeable |
| PlugsGiven N power strips each with a plug capacity, compute the max number of computers powered when strips are chained from one wall outlet. | Easy2 | MathGreedy+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Laundry Owner DonghyukGiven a number of cents, output the minimum count of quarters, dimes, nickels, and pennies using a greedy coin breakdown. | Easy2 | GreedyMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Triangular Gimbap Price ComparisonGiven several price rates for gimbap, compute the cheapest cost to buy exactly 1000 grams using the best per-gram rate among all stores. | Easy2 | MathGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Sugar DeliveryFind the minimum number of 3kg and 5kg bags that sum to exactly N kilograms, or -1 if impossible. | Easy2 | GreedyMath | No attempts yet | 1s | 128 MB | Judgeable |
| Difference Between 5 and 6Given two integers, compute the minimum and maximum possible sums after freely swapping digits 5 and 6 in each number. | Easy2 | StringGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Chessboard PiecesGiven N straight guillotine cuts through a rectangular board, compute the maximum number of resulting pieces. | Easy2 | MathGreedy | No attempts yet | 1s | 128 MB | Judgeable |
| Vacation HomeworkGiven L vacation days and per-day limits C and D, find the most free days after finishing A Korean and B math pages. | Easy2 | MathGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ChangeGiven a purchase amount below 1000 yen paid with a 1000-yen bill, find the minimum number of coins in the change. | Easy2 | GreedyMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Papaya JungleBessie moves greedily through a grid, always stepping to the adjacent square with the most uneaten papayas, and we sum the fruit she eats until she reaches the bottom-right corner. | Easy2 | SimulationArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TV ReportsTrack daily Dollar prices against the previous day and the running all-time high, printing NTV drop headlines and BBTV record headlines in day order. | Easy2 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Time on TaskGiven a time limit and chore durations, find the largest number of chores that can be completed in any order. | Easy2 | GreedySorting | No attempts yet | 1s | 128 MB | Judgeable |
| ChessEach row holds at most one rook, so take the largest value in every row with a positive maximum and add them. | Easy2 | GreedyArray | No attempts yet | 1s | 128 MB | Judgeable |
| DisplayFit the words of a space-separated text into the fewest rows of width w, breaking a row only when the next word does not fit. | Easy2 | GreedySimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Fast Food PrizesAdd up, over disjoint prize sets, the prize value times the smallest sticker count among its required kinds. | Easy2 | GreedyMath+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Arrangement of ContestCount the titles that form the longest unbroken run from A onward, using each title's first letter and stopping at the first missing letter. | Easy2 | GreedyString+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Kids love candyEach test case gives candy piles and K, and asks for the most children who can each receive at least K pieces of a single kind. | Easy2 | MathGreedy | No attempts yet | 1s | 128 MB | Judgeable |
| The KingPick any subset of up to 100 values from minus 3 to 3 so the sum of the chosen values raised to the given power 1 to 3 is as large as possible. | Easy2 | GreedyMath | No attempts yet | 2s | 128 MB | Judgeable |
| Microwave ButtonsPress the 5-minute, 1-minute, and 10-second buttons to total exactly T seconds with the fewest presses, or print -1 when impossible. | Easy2 | GreedyMath | No attempts yet | 1s | 64 MB | Judgeable |
| The return of the KingSplit the digit string into grades of 1 to 10 in the single valid way and print the average rounded to two decimals. | Easy2 | StringGreedy | No attempts yet | 1s | 256 MB | Judgeable |
| Three Kangaroos 2Three kangaroos on integer points let an outer one jump between the other two, and each test case asks for the largest possible number of jumps. | Easy2 | GreedyMath | No attempts yet | 1s | 256 MB | Judgeable |
| AmpelmännchenFor each item pick the West or East version that gives the larger population-weighted happiness total. | Easy2 | GreedyImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| FloodFollow the given greedy procedure to build a permutation histogram with trapped-water capacity X, or print -1 when it fails. | Easy2 | GreedyImplementation | No attempts yet | 1s | 64 MB | Judgeable |
| Stock InvestmentGiven each day's profit for three stocks, pick at most one stock per day and maximize the total profit. | Easy2 | ArrayGreedy | No attempts yet | 1s | 128 MB | Judgeable |
| Graph Maximum MatchingGiven a small graph, decide whether some edges can be kept so every vertex has degree exactly 1. | Easy2 | GraphBacktracking+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Life SavingsCompare the savings from one 20%-style whole-purchase coupon against the best way to spend two one-item coupons on two of three items, then print the winning plan and its savings. | Easy2 | Brute forceMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Analysis of Advanced AnalyticsGiven daily page counts and a fixed notebook size, count how many notebooks are needed when each day's notes must fit in one notebook without splitting. | Easy2 | SimulationGreedy+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Master Manager Nam JeonghunGiven L left-footed, R right-footed, and A two-footed players, find the largest even team size with equal left and right counts. | Easy2 | MathGreedy | No attempts yet | 1s | 128 MB | Judgeable |
| TeleportationGiven start a, end b, and a bidirectional teleporter linking x and y, find the minimum tractor distance to move from a to b, with the option to skip the teleporter. | Easy2 | MathImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |
| What Does UCPC Stand For?Given one string, decide whether deleting some characters can leave exactly the subsequence UCPC, case sensitive. | Easy2 | StringGreedy+1 | No attempts yet | 1s | 512 MB | Judgeable |
| BagsGiven n waste pieces with identifiers, find the minimum number of bags so that each bag holds pieces of only one identifier. | Easy2 | Hash mapImplementation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| TreasureGiven two arrays A and B, rearrange A (B stays fixed) to minimize the sum of elementwise products, using the sorted pairing strategy. | Easy3 | GreedySorting+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Guitar StringsBuy at least N guitar strings using packages of 6 or single strings from M brands at given prices, minimizing total cost. | Easy3 | Brute forceGreedy+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Castle GuardsGiven a grid of guards, compute the minimum number of guards to add so every row and column has at least one, which equals the max of empty-row count and empty-column count. | Easy3 | ArrayGreedy+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Repairing Pipe LeaksGiven leak positions and a fixed tape length, compute the minimum number of length-L tapes needed so each leak is covered with at least 0.5 margin on both sides. | Easy3 | GreedySorting+1 | No attempts yet | 2s | 128 MB | Judgeable |
| WalkingCompute the minimum time to walk from (0,0) to (X,Y) on a grid where straight moves cost W and diagonal moves cost S. | Easy3 | MathGreedy | No attempts yet | 2s | 128 MB | Judgeable |
| Maximum ProductSplit S into K positive integers as equal as possible to maximize their product, given S and K up to 100 and 20. | Easy3 | MathGreedy | No attempts yet | 2s | 128 MB | Judgeable |
| Lost ParenthesesGiven an arithmetic expression with only plus and minus signs, place parentheses to minimize the evaluated result. | Easy3 | GreedyString+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Common PermutationFor each pair of input strings, count letter frequencies and output the multiset intersection sorted alphabetically as the longest common rearranged subsequence. | Easy3 | Hash mapString+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Garbage CollectionSimulate a garbage truck visiting points in order, returning to the dump when its load is full or would overflow, and compute the total distance traveled. | Easy3 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Card Bundle SortingGiven N sorted card bundle sizes, find the minimum total comparisons to merge them all into one bundle using an optimal merge strategy (classic huffman-like heap problem). | Easy3 | HeapGreedy | No attempts yet | 2s | 128 MB | Judgeable |
| Sum of Distinct NumbersGiven a sum S, find the largest number of distinct positive integers that can add up to exactly S. | Easy3 | MathBinary search+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Repairing a Mud RoadGiven non-overlapping puddle intervals and fixed-length planks, find the minimum number of planks needed to cover all puddles. | Easy3 | GreedyIntervals | No attempts yet | 2s | 128 MB | Judgeable |
| Meeting Room SchedulingGiven N meetings with start and end times, select the maximum number of non-overlapping meetings using a classic greedy interval scheduling approach. | Easy3 | GreedySorting+1 | No attempts yet | 2s | 128 MB | Judgeable |
| DNAGiven N DNA strings of length M, construct the string minimizing total Hamming distance to all, breaking ties lexicographically, and output that distance. | Easy3 | StringGreedy+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Drawing LinesGiven N line segments on a number line, compute the total length covered by at least one segment, merging overlaps. | Easy3 | IntervalsSorting+1 | No attempts yet | 1s | 192 MB | Judgeable |
| RopesChoose a subset of ropes so that each rope's capacity times the count of chosen ropes is maximized, to find the greatest liftable weight. | Easy3 | SortingGreedy | No attempts yet | 2s | 192 MB | Judgeable |
| Making Equal-Length SticksGiven piece lengths, find the smallest stick length such that all pieces can be regrouped into sticks of that equal length (the sum divided by a suitable divisor, bounded by the maximum piece). | Easy3 | MathGreedy+1 | No attempts yet | 3s | 128 MB | Judgeable |
| Pancake LoveGiven raw ingredient counts, compute the maximum batter portions (limited by a scaling factor) and topping-based pancake counts, then output the minimum of total toppings possible and batter portions. | Easy3 | MathGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Asian Informatics OlympiadSort students by descending score and pick the top three medalists while capping each country to at most two medals. | Easy3 | SortingGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Equal-Sum SegmentsSplit an array into contiguous segments with equal sums and output the smallest possible such common sum. | Easy3 | Prefix sumGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Contest or InternshipGiven female and male student counts and a number who must leave for internship, decide who to remove to maximize teams of 2 females and 1 male each. | Easy3 | GreedyMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Chocolate LunchGiven K, find the smallest power-of-two chocolate bar size and the minimum number of halving splits needed to obtain exactly K unit pieces. | Easy3 | Bit manipulationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Machine CodeGiven a sequence of instructions with parameters, compute the minimum NOPs needed so each instruction starts at an address divisible by 4. | Easy3 | GreedySimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Rock-Paper-Scissors ScoreGiven a player's rock-paper-scissors choices against several friends over multiple rounds, compute the actual score and the best possible score with foreknowledge each round. | Easy3 | SimulationGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Croatian AlphabetParse a string left to right, greedily matching multi-character Croatian letter codes (like c=, dz=, lj), and count total letters. | Easy3 | StringGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Cutting ChocolateGiven an N by M chocolate bar, find the minimum number of square pieces obtained by repeatedly cutting it fully along rows or columns. | Easy3 | MathNumber theory+1 | No attempts yet | 1s | 128 MB | Judgeable |
| PizzaGiven each friend's pizza appetite of 1/4, 1/2, or 3/4, compute the minimum number of whole pizzas needed to serve exact slices to all. | Easy3 | GreedyMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| DollarsSimulate converting between dollars and marks daily using given rates to maximize final dollar amount, truncated to two decimals. | Easy3 | GreedySimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| PolygonDecide whether N given segment lengths can form the sides of some convex polygon, which reduces to checking that the largest length is smaller than the sum of the rest. | Easy3 | GreedyMath | No attempts yet | 1s | 128 MB | Judgeable |
| HolesFind the smallest non-negative integer without leading zeros whose digits produce exactly h holes, where 0,4,6,9 give one hole and 8 gives two. | Easy3 | GreedyMath | No attempts yet | 3s | 256 MB | Judgeable |
| Journey with PigsGiven pig weights and per-village net price coefficients, assign pigs to villages one-to-one to maximize total revenue (sort and multiply greedily). | Easy3 | GreedySorting+1 | No attempts yet | 2s | 64 MB | Judgeable |
| Building a Swimming PoolCompute the minimum cost to convert a grid into grass/hole cells, forcing the border to be grass and charging per boundary edge between grass and hole. | Easy3 | ArrayGreedy+1 | No attempts yet | 2.5s | 128 MB | Judgeable |
| Control PointsGiven sorted coordinates of control points, find the minimum number of length-1 half-open intervals needed to cover all points using a greedy sweep. | Easy3 | GreedySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ProfitGiven a sequence of daily profits, find the maximum total over any non-empty stretch of consecutive days, across several test cases. | Easy3 | ArrayDynamic programming+1 | No attempts yet | 1s | 256 MB | Judgeable |
| AntsGiven ant positions on a rod of length l, choose each ant's initial direction to minimize and maximize the time for all ants to fall off. | Easy3 | MathGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Car RacingGiven the order in which cars arrive, decide whether a single FIFO bypass lane can reorder them to increasing order. | Easy3 | StackSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Patterns and PicturesFor each data set, compute the total area of one full set, then find how many full sets fit in one, two, and three square yards. | Easy3 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Carbonated DrinksGiven starting empties, empties found, and the empties needed per exchange, count how many drinks Junmin can obtain and drink in total. | Easy3 | MathSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The God of ParkingGiven shop coordinates on a line, pick an integer parking spot and visit all shops, returning to the car, to minimize total walking distance. | Easy3 | MathGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Longest Decreasing SuffixFor each string, print its longest suffix whose characters strictly decrease from left to right. | Easy3 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Dividing the Pirate HoardEach of N pirates in turn splits the pile into N equal parts, keeps one part plus the remainder, and returns the rest; report each pirate's hidden coins and the leftover pile. | Easy3 | SimulationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Pirates On ParadeSort pirates by height, then pair each shortest remaining pirate with the next one if their heights differ by at most 2 inches, and drop the rest. | Easy3 | SortingGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| PLU CountFor each text string, find the largest k such that PLU repeated k times is a subsequence, ignoring case. | Easy3 | GreedyString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Card Captor SanggeunSimulate a two-player card game where each player always plays the smallest legal card, and report the final scores. | Easy3 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| He is offside!Given distances of attackers and defenders to the goal line, decide whether any attacker is offside, meaning nearer to the goal than the second-last defender. | Easy3 | ImplementationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Hay BalesGiven N piles of hay with possibly unequal heights, find the minimum number of bales to move so all piles have equal height. | Easy3 | ArrayMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ProfitsGiven a sequence of N daily profits, find the maximum sum over any contiguous stretch of days. | Easy3 | ArrayDynamic programming+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Cow CotillionGiven strings of '<' and '>', decide for each whether every character can be paired as a properly nested '><' bow, i.e. whether the brackets are balanced. | Easy3 | StackString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| BookshelfGiven cow heights and a shelf height B, find the smallest number of cows whose heights sum to at least B. | Easy3 | GreedySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Making ChangeGiven a target amount and up to 10 coin denominations, find the fewest coins that sum exactly to the target. | Easy3 | Dynamic programmingGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Box of BricksGiven stack heights whose total is divisible by n, find how many bricks must move so every stack reaches the equal target height. | Easy3 | ArrayGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Kilometers to MilesConvert each kilometer value to miles by writing it in Zeckendorf Fibonacci form, dropping the lowest bit, and re-evaluating. | Easy3 | MathGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SubsequenceFor each line of input, decide whether the first string is a subsequence of the second, printing Yes or No. | Easy3 | Two pointersString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SignageGiven a sign width, lay out a fixed sentence into lines, justifying each line so spaces are spread as evenly as possible, and print dots for spaces. | Easy3 | StringSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Milk and HoneyEach field holds either cows up to its cow limit or bees up to its bee limit; assign each field one animal type to maximize happiness from milk and honey. | Easy3 | GreedySorting+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Aliens' SocksFind the minimum number of socks to draw so that at least k of one color are guaranteed, given the counts per color. | Easy3 | GreedyMath+1 | No attempts yet | 1s | 1024 MB | Judgeable |
| Alien SocksGiven counts of socks in s colors, find the smallest number of socks to draw to guarantee k socks of one color, or -1 if impossible. | Easy3 | MathGreedy+1 | No attempts yet | 1s | 1024 MB | Judgeable |
| PyramidsGiven N blocks, repeatedly take out the largest triangular number that fits, and print the resulting pyramid heights in decreasing order. | Easy3 | GreedyMath+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| AnimalsGiven N active time intervals, find whether they share a common moment and, if so, the longest interval when all animals are active. | Easy3 | IntervalsImplementation+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| CouriersSimulate two couriers who each take an incoming order if free, preferring the faster one, and total each courier's earnings. | Easy3 | SimulationImplementation+1 | No attempts yet | 1s | 1024 MB | Judgeable |
| ElevatorRusnė goes from floor 0 to floor N using the elevator for at most K segments; minimize the total height of the segments she climbs on foot. | Easy3 | GreedySorting+1 | No attempts yet | 1s | 1024 MB | Judgeable |
| LaundryGiven colors partitioned into washable groups and counts of clothes per color, find how many machine loads of capacity M are needed. | Easy3 | MathImplementation+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Skew BinaryConvert each decimal number into its unique skew binary representation, printed as the sorted ranks of its nonzero digits. | Easy3 | MathGreedy+2 | No attempts yet | 1s | 128 MB | Judgeable |
| StampsGiven a needed stamp count and each friend's offer, find the fewest friends whose offers sum to at least the needed amount, or report impossible. | Easy3 | GreedySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |