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 results2,730 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Word AmalgamationFor each scrambled word, print all dictionary words that are anagrams of it in alphabetical order, or NOT A VALID WORD. | Easy3 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Losers Are WinnersGroup contestants into teams of two, compute each team's percentage of combined weight lost, and print the winner with one decimal place. | Easy3 | Hash mapImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| I-SoarGiven building intervals along a highway, find the total length of the highway not covered by any building. | Easy3 | IntervalsSorting | No attempts yet | 1s | 128 MB | Judgeable |
| Beautiful TriangleGiven three vertices, classify the triangle by side lengths and by angles, or report that the points are collinear. | Easy3 | GeometryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Post OfficeSort each item's three dimensions into length, height, and thickness, then apply the postal size rules to print one of four classes. | Easy3 | ImplementationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Bridge BiddingFor each 13-card bridge hand, compute high card points and suit lengths, then print the first applicable opening bid rule. | Easy3 | ImplementationSimulation+1 | 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 |
| ShirtsMerge two already sorted lists of shirts and print one merged list ordered by size, then by colour letter. Multiple scenarios end with a 0. | Easy3 | SortingTwo pointers+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Hostel NightsFor each week, apply five nights of elimination rules to 20 rooms and list the students who survive the most nights, ordered by room number. | Easy3 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Gadget PurchasesCount how many visits demand each machine, cap each count at its usage limit, and report the machines whose revenue beats purchase plus usage cost. | Easy3 | ArrayImplementation+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 |
| Duplicate SSNRead a list of Social Security numbers until the sentinel 000-00-0000, then print every number that appears more than once in ascending order. | Easy3 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| POIEach problem's value is the count of contestants who missed it; report Philip's total score and his rank using the four tiebreak terms. | Easy3 | ImplementationArray+2 | No attempts yet | 1s | 256 MB | Judgeable |
| NumbersGiven N positive integers, find the value with the highest frequency, breaking ties by choosing the smallest value. | Easy3 | ArrayHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| School Trip Destination RankingCount how many of n students want each of m destinations, then print destination numbers by descending count with ties broken by ascending number. | Easy3 | ArraySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Common DivisorsGiven 2 or 3 numbers up to 1e8, print every positive integer that divides all of them, in increasing order. | Easy3 | MathNumber theory+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Reversed-Element SortReverse the digits of each of n positive integers, drop leading zeros, then print the reversed values in ascending order. | Easy3 | SortingMath+1 | 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 |
| Magic TrickGiven four cards in the order shown, decode the hidden fifth card using the suit of the first card and the permutation of the last three. | Easy3 | ImplementationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Grandpa is Famous!Given weekly ranking lists, count how many times each player appears, then print the players with the second-highest count in ascending order. | Easy3 | Hash mapSorting+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Race ResultsSort N finish times given as hours, minutes, and seconds in ascending order and print each on its own line. | Easy3 | SortingImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Theater SeatingAssign each seat a priority by Euclidean distance to the middle of row 1, breaking ties by row then by seat number, and print rows back to front. | Easy3 | SortingMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Perfect CowGiven an odd N by N grid, take the median of each row, then return the median of those N row medians. | Easy3 | SortingArray+1 | 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 |
| Costume PartyCount pairs of cows whose lengths sum to at most S. | Easy3 | SortingTwo pointers+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Unix ls Column FormattingSort filenames by ASCII value and lay them out in column-major order with fixed-width padding, as few rows as fit in 60 characters. | Easy3 | SortingImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Soccer TournamentRead team lists and played games, then print a result grid and a standings table sorted by points, goal difference, goals, wins, and reverse input order. | Easy3 | ImplementationSorting | No attempts yet | 1s | 128 MB | Judgeable |
| Read the ChessboardGiven an ASCII-art chessboard, list each side's pieces in standard notation, grouped by type in a fixed order and sorted by position rules. | Easy3 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Bridge HandsDeal a 52-card deck to four bridge players from a given dealer, sort each 13-card hand by suit and rank, and print the hands in a fixed card-table format. | Easy3 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Absolutely AcidicCount the frequency of readings in the range 1 to 1000, then apply tie-breaking rules to find which two readings to subtract. | Easy3 | ArrayImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Fix-Free CheckFor each triple of words, decide whether no word is a prefix or suffix of another, printing Yes or No. | Easy3 | StringBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TopYodellerCompute each yodeller's cumulative score after every round, find who ends with the highest total, and report their worst rank. | Easy3 | ArraySimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Students' Council BreakfastGiven four ticket prices and a target amount, list every non-negative count combination that hits the target, count them, and report the fewest tickets needed. | Easy3 | Brute forceImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SentencesGiven lists of subjects, verbs, and objects, print every subject-verb-object sentence in alphabetical order, with a blank line between datasets. | Easy3 | Brute forceSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Train SwappingFor each test case, count the inversions of a permutation of 1..L, the minimum number of adjacent swaps needed to sort the train. | Easy3 | ArraySorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Trimmed and Corrected MeanGiven N judge scores and an integer K, sort the scores, then output the trimmed mean that drops K from each end and the corrected mean that replaces those extremes with the nearest kept value, both rounded to two decimals. | Easy3 | SortingPrefix sum+2 | No attempts yet | 1s | 256 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 |
| 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 |
| SortingA full comparison table between two hidden permutations of 1..N is given; recover the value on every card. | Easy3 | SortingImplementation | 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 |
| Ancient KeyboardSimulate a keyboard where each of up to 26 keys toggles an LED at two given times, and output the letter matching the LED count at each time step until all intervals end. | Easy3 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Ride My BicycleCompute the ratio of each of the 21 front and back gear pairs, round to two decimals, and print them sorted by ratio then chain ring. | Easy3 | SortingImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| BoxGiven six rectangles that can be rotated, decide whether they form the three pairs of opposite faces of a rectangular box. | Easy3 | ImplementationSorting+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Kick-TippGiven each participant's predicted scores and the actual results over several rounds, compute total points, award round dots to top scorers, and print the sorted standings. | Easy3 | ImplementationSorting+1 | 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 |
| StrategiesGiven contest time and problem times, simulate three orderings (input, ascending, descending) and pick the winner by problems solved, then score, then Steve. | Easy3 | SimulationSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| AnagramsGiven several word lists, print the first word in each list that has the most anagrams, along with that count. | Easy3 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Matryoshka DollsGiven doll heights, nest each doll inside a strictly taller doll, each holding at most one, to minimize the number of outermost dolls. | Easy3 | GreedySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The Chosen Sub MatrixFor each N x N matrix, find the M x M sub matrix with the fewest distinct values, breaking ties by larger descending value lists, then by smaller top-left row and column. | Easy3 | Brute forceImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Email from the ProfessorWrite each message row by row into a grid of width k, then read columns in the order given by a permutation key, dropping padding cells. | Easy3 | ImplementationArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| ACM Rank TableAggregate each team's runs under ACM penalty rules, then sort teams by solved count, total time, and team number. | Easy3 | SortingImplementation+1 | No attempts yet | 2s | 128 MB | Judgeable |
| SupermarketFind the k-th smallest value among n amounts spent, with values bounded by 100000. | Easy3 | SortingArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| IntervalsGiven n closed intervals, merge all overlapping or touching ones and print the resulting disjoint intervals in ascending order. | Easy3 | SortingIntervals+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TablesGiven box screw counts, find the fewest boxes whose screws total at least s*k. | Easy3 | GreedySorting | No attempts yet | 1s | 128 MB | Judgeable |
| Binary ScaleSort the given (reading, precision) pairs by reading divided by 2 to the precision, breaking ties by smaller reading. | Easy3 | Sorting | No attempts yet | 1s | 128 MB | Judgeable |
| Sorting the JewelrySort up to 150 lowercase strings by increasing length, breaking ties in lexicographic order. | Easy3 | Sorting | No attempts yet | 1s | 512 MB | Judgeable |
| The BetTurn the fewest dice so exactly k of the six faces appear, keeping the most frequent faces and adding missing ones. | Easy3 | GreedySorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| NailsLower at most k nails to match a chosen height and maximize how many nails share that height. | Easy3 | SortingGreedy | No attempts yet | 1s | 128 MB | Judgeable |
| TapsClose the fewest flowing taps so the average temperature of the water still flowing reaches at least w. | Easy3 | GreedySorting | No attempts yet | 1s | 128 MB | Judgeable |
| CircuitsPick the most cables whose total battery voltage does not exceed their total wire tolerance. | Easy3 | SortingGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| IntervalsCount the integers covered by at least one of N closed intervals in each test set. | Easy3 | IntervalsSorting | No attempts yet | 2s | 128 MB | Judgeable |
| PasswordFind the K-th password in lexicographic order whose letters appear in the same column of both 6 by 5 grids, or print NO. | Easy3 | CombinatoricsSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| HunterCount animals within range L of a firing position on the x-axis under distance |x - a| + b. | Easy3 | Binary searchSorting | No attempts yet | 1s | 128 MB | Judgeable |
| 6174For each four-digit number, repeat the Kaprekar digit-sort subtraction until 6174 appears and report the step count. | Easy3 | SimulationSorting | No attempts yet | 1s | 128 MB | Judgeable |
| ICPC RankingSimulate the ICPC log to score each team by solved problems and penalty time, then print the ordered ranking with ties marked. | Easy3 | SimulationSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Inviting the Village ChiefPlant one tree per day in the best order and report the earliest day after all trees have finished growing. | Easy3 | GreedySorting | No attempts yet | 1s | 128 MB | Judgeable |
| EligibilityCount distinct contest years per contestant after dropping duplicate records and print names with four or fewer in lexicographic order. | Easy3 | Hash mapSorting | No attempts yet | 1s | 128 MB | Judgeable |
| Sort MeThe program sorts each dataset of up to 20 words by the given custom alphabet and prints the ordered list. | Easy3 | SortingString | No attempts yet | 1s | 128 MB | Judgeable |
| Ballot Analyzing DeviceCount ballots with exactly one mark as votes, rank candidates by votes keeping ballot order on ties, and print each percentage plus the invalid share. | Easy3 | ImplementationSorting+1 | No attempts yet | 2s | 256 MB | Judgeable |
| PoliticsOrder supporters by the listed candidate order, keep original order within each candidate, and group unlisted candidates at the end by first appearance. | Easy3 | SortingHash map | No attempts yet | 15s | 256 MB | Judgeable |
| FootballDistribute at most G bought goals across N finished matches to maximize total points, with 3 for a win and 1 for a draw. | Easy3 | GreedySorting | No attempts yet | 1s | 128 MB | Judgeable |
| Between the MountainsPick one altitude from each mountain so the absolute difference between the two is as small as possible. | Easy3 | Two pointersSorting | No attempts yet | 1s | 128 MB | Judgeable |
| Goldilocks and the N CowsChoose an integer barn temperature that maximizes total milk when each cow yields X if cold, Y if inside its range, and Z if hot. | Easy3 | SortingIntervals | No attempts yet | 1s | 128 MB | Judgeable |
| Meeting Room ArrangementPick the largest set of non-overlapping events in each test case from given start and finish times. | Easy3 | GreedySorting | No attempts yet | 1s | 128 MB | Judgeable |
| The Sultan's ChapatiFollow the prescribed flip procedure to sort each stack largest on the bottom and print the flip positions ending with 0. | Easy3 | SimulationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Sharkovski's OrderingSort each test case of up to 255 integers into Sharkovski ordering and print them space-separated on one line. | Easy3 | SortingMath | No attempts yet | 2s | 128 MB | Judgeable |
| Straight FlushFind the longest run of consecutive ranks sharing one suit after merging duplicate cards. | Easy3 | SortingHash map | No attempts yet | 5s | 512 MB | Judgeable |
| Unlock My SafeThe program prints the sorted permutation of digits 1 to N at index floor(N factorial / 3) for each N. | Easy3 | CombinatoricsSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Boiled EggsSort the eggs by weight and boil the lightest ones while the count stays within P and the total weight stays within Q. | Easy3 | GreedySorting | No attempts yet | 1s | 128 MB | Judgeable |
| Damage Over TimePick up to M abilities to maximize total damage per second, breaking ties by longest shared duration, and report both numbers. | Easy3 | SortingGreedy | No attempts yet | 1s | 128 MB | Judgeable |
| Olympic Games RankingSort up to 250 nations by gold, silver, then bronze medals and print competition ranks with totals, breaking ties alphabetically. | Easy3 | SortingImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Another Word SortingSort up to 1000 lowercase words by letter-value totals plus a bonus for each adjacent equal pair, breaking ties alphabetically. | Easy3 | SortingString | No attempts yet | 1s | 128 MB | Judgeable |
| Cabric NumberSimulate the Kaprekar digit routine to 6174 or 0 for each input and print every subtraction step. | Easy3 | SimulationSorting | No attempts yet | 1s | 128 MB | Judgeable |
| Selecting the Ten Best TeachersTally valid ballots into weighted place scores and print the top ten teachers with vote breakdowns in fixed-width columns. | Easy3 | SimulationSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| PaintDo n paint jobs one per day, highest daily price rise first, to minimize base prices plus accumulated surcharges. | Easy3 | GreedySorting | No attempts yet | 2s | 512 MB | Judgeable |
| Record KeepingCount how many times the most repeated unordered group of three cow names appears in N lines. | Easy3 | Hash mapSorting | No attempts yet | 1s | 128 MB | Judgeable |
| Bree's pantrySort the cans by height with a case-insensitive code tiebreak, then place them alternately left and right from the middle and print the row. | Easy3 | SortingSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Does This Make Me Look Fat?Sort each group of dieters by current weight, computed as starting weight minus days on the diet, heaviest first. | Easy3 | SortingImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| BuffcraftPick at most k direct and percentage buffs so the boosted base times the percentage multiplier is as large as possible. | Easy3 | SortingGreedy+1 | No attempts yet | 2s | 256 MB | Judgeable |
| The Cost of MovingSort each list of unique product names alphabetically and sum how far every item moves from its original slot. | Easy3 | SortingHash map | No attempts yet | 3s | 256 MB | Judgeable |
| Rank OrderCompare two judges' score lists by ranked order and report the highest place where the ranked competitors differ, or agree when all match. | Easy3 | Sorting | No attempts yet | 3s | 256 MB | Judgeable |
| Let's make some spaceList in increasing order every room width obtainable by raising any subset of the given partition positions. | Easy3 | Brute forceSorting | No attempts yet | 1s | 256 MB | Judgeable |
| Ideal ScoreboardTrack contest solves in time order and report the interval during which every team and every problem has a solve but none has all. | Easy3 | SimulationSorting | No attempts yet | 2s | 256 MB | Judgeable |
| Multiple of 30Rearrange all digits of N into the largest number divisible by 30, or print -1 when impossible. | Easy3 | SortingMath | No attempts yet | 1s | 256 MB | Judgeable |
| CompoCount the pairs of contests whose inclusive time ranges overlap in each test case. | Easy3 | SortingIntervals | No attempts yet | 1s | 256 MB | Judgeable |
| JerseysEach player wants one numbered jersey in a minimum size, and the goal is to satisfy as many players as possible. | Easy3 | GreedySorting | No attempts yet | 1s | 256 MB | Judgeable |
| Sort by AgeSort N members by increasing age, keeping earlier join order for equal ages. | Easy3 | Sorting | No attempts yet | 3s | 256 MB | Judgeable |
| Korean, English, mathSort N students by Korean score descending, English ascending, math descending, then name in ASCII order and print the names. | Easy3 | Sorting | No attempts yet | 1s | 256 MB | Judgeable |
| Sort without duplicatesSort N integers in ascending order and print each distinct value once, separated by spaces. | Easy3 | Sorting | No attempts yet | 1s | 256 MB | Judgeable |
| Heading to World FinalsRank all teams by solved problems, then penalty, and print the best team from each of the top K universities. | Easy3 | SortingHash map | No attempts yet | 1s | 128 MB | Judgeable |