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 results1,798 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Gnome SequencingFor each of N triples of beard lengths, decide whether the three values are strictly increasing or strictly decreasing, then print Ordered or Unordered. | Easy2 | ImplementationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Remove the DuplicatesFor each test case, collapse every run of consecutive equal numbers into a single value and print the result. | Easy2 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| DoublesFor each list of 2 to 15 natural numbers ending in 0, count how many values x have 2x also in the same list. | Easy2 | ArrayHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Magnificent MeatballsGiven a circular list of guest meatball counts, find the position k where the sum of positions 1 through k equals the sum of the rest. | Easy2 | ArrayPrefix sum+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Filling Out the TeamFor each player's speed, weight, and strength, print the positions whose limits the player satisfies, in table order, or No positions. | Easy2 | ImplementationBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Judging OlympiaFor each line of six judge grades, discard the highest and lowest and print the average of the remaining four, stopping at the all-zero line. | Easy2 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ICPC Score Totalizer SoftwareFor each contestant, drop one highest and one lowest judge score, then output the truncated average of the rest. | Easy2 | ImplementationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| DVDsApply a series of clamped sale and restock transactions to each DVD title's stock and report the final count. | Easy2 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Oil ExplorationFor each column of a grid, scan downward and sum drilling costs (H costs 3, S costs 1) until the first oil cell, or print N if none exists. | Easy2 | ArraySimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Map InterfaceGiven station coordinates and a visited sequence, count how many stations fall inside the smallest axis-aligned rectangle covering the visited stations. | Easy2 | ArrayImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Contest SeatsCount how many participants fail to get their chosen seat, since only the first arrival for a seat can sit there. | Easy2 | ImplementationHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Civil EngineeringRead material densities and oblong dimensions, then sum each oblong's volume times its material density for each data set. | Easy2 | ImplementationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Stacked Floating MountainsGiven several sequences, decide for each whether every element from the third onward equals the sum of the two before it. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Chess PuzzleFor each board, read the rook coordinates and report SAFE if no two rooks share a row or column, otherwise NOT SAFE. | Easy2 | ImplementationHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Checkerboard RowsFor each of B boards, read n pieces given as column-row pairs and print the largest number of pieces sharing the same row. | Easy2 | ArrayHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Secret LocationEach of six lines encodes one number by its character count; print the first three as Latitude and the last three as Longitude in the given format. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Total CountRead fighter names until a line with 0, print each name with its kill count in first-appearance order, then the grand total. | Easy2 | Hash mapImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| LeagueGiven every match result in a round-robin soccer league, compute each team's total points and print its rank, where tied teams share the best rank. | Easy2 | ImplementationArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Dice GameSimulate a piece on a board of cells, applying a die roll then the cell's instruction, and report how many rolls reach the goal. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Card Flipping GameGiven two rows of n digit cards, reveal pairs left to right; the larger card wins both cards' sum, and equal cards each keep their own. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Tunnel Entrance and ExitTrack the number of cars in a tunnel each minute from entrance and exit counts, and print the maximum count, or 0 if it ever goes negative. | Easy2 | ImplementationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| BirthdayGiven each student's name and birthday, print the name of the youngest student, then the oldest. | Easy2 | ImplementationSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Weekend LotteryGiven N past draws of C distinct numbers from 1 to K, print all numbers that appeared the fewest times, in increasing order. | Easy2 | ArrayImplementation | No attempts yet | 3s | 128 MB | Judgeable |
| Head or TailFor each test case, count the zeros and ones in the list of game results and print how many games Mary and John each won. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Pascal LibraryGiven D attendance rows over N alumni, decide whether some alumnus attended every dinner. | Easy2 | ArrayImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Grade StatisticsFor each class, read the scores, then report the maximum, the minimum, and the largest gap between neighboring scores after sorting in descending order. | Easy2 | SortingImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Breed ProximityGiven a line of N cows with breed ids, find the largest breed id whose two occurrences lie within K positions of each other, or -1 if none exist. | Easy2 | ArrayHash map+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 |
| Hay ExpensesGiven N daily hay counts and Q ranges, output the sum of counts over each range from S to E inclusive. | Easy2 | Prefix sumArray | No attempts yet | 1s | 128 MB | Judgeable |
| Time CardsFor each cow, pair her START and STOP entries and print the total time she spent at the milking machine as hours and minutes. | Easy2 | ImplementationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| StatisticsRead N integers, print their mean and median rounded to six decimal places. | Easy2 | ArraySorting+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 |
| Do the ShuffleSimulate a fixed 5-song playlist through button presses that rotate left, rotate right, or swap the first two songs, then print the final order. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| It's Cold Here!Read city names with integer temperatures, one per line, and print the name of the city with the lowest temperature. | Easy2 | ImplementationArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Deal or No Deal CalculatorRead eliminated case numbers and a Banker's offer, compute the average of the remaining amounts, and print deal if the offer is higher, otherwise no deal. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Mouse MoveThe cursor starts at (0,0) on a screen of width c and height r; each relative move is clamped to the screen edges, and the position after every move must be printed. | Easy2 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Smile with SimilesGiven up to five adjectives and five nouns, print every phrase of the form "<adjective> as <noun>" in nested input order. | Easy2 | ImplementationBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| NonogramGiven a grid of black and white squares, print the lengths of the consecutive black blocks in each row and then each column. | Easy2 | ImplementationArray+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| CardsA 52-card deck is missing exactly one card; given the other 51 cards as suit and value pairs, output the missing suit and value. | Easy2 | ArrayHash map+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| The Worm TurnsSimulate a 20-cell worm on a 50x50 grid through a list of moves, stopping when it hits itself, leaves the board, or finishes. | Easy2 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Programming Contest PasswordsFor each test case, read a word list and participant index sequences, then print each password formed by concatenating the indexed words. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ExerciseFor each machine, multiply each exercise level's energy rate by its duration and sum the totals per person. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| The PaintingRead an n by m grid of . and # characters and print it rotated 90 degrees clockwise, producing m rows of n characters. | Easy2 | ArrayMatrix+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ParkFor each of up to one million heights in order, output the maximum height to its west and to its east, using its own height when no higher point exists. | Easy2 | Prefix sumArray | No attempts yet | 1s | 512 MB | Judgeable |
| Bagels on a StickSlide a chosen bagel off one end of the stick after removing the fewest bagels it cannot slide through. | Easy2 | Array | No attempts yet | 1s | 512 MB | Judgeable |
| Caesar CipherDecode a Caesar-shifted uppercase message by matching its most frequent letter to the given original letter. | Easy2 | StringArray+1 | No attempts yet | 1s | 512 MB | Judgeable |
| WarehouseTally up to a million signed per-product shipment records and print the remaining stock of each product in alphabetical order. | Easy2 | ArraySimulation | No attempts yet | 1s | 512 MB | Judgeable |
| Ranking ManipulationChoose weights on the tasks you solved so you finish first, then count the contestants tied with you. | Easy2 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| ThumbtacksFind the smallest jump that crosses the bridge using only planks without thumbtacks. | Easy2 | Array | 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 |
| Pear Trees and Apple TreesFind the largest distance between any pear tree and any apple tree in a row of n trees. | Easy2 | Array | No attempts yet | 1s | 128 MB | Judgeable |
| SalesFor each test case, count pairs of days where the earlier day sold no more than the later day and print the total. | Easy2 | Brute forceArray | No attempts yet | 1s | 128 MB | Judgeable |
| DisplayAdd K consecutive numbers starting from the B-th value of a length-N sequence that repeats forever. | Easy2 | ArraySimulation | No attempts yet | 1s | 128 MB | Judgeable |
| TrainPassengers board in order into the non-full car with the fewest same-initial riders, ties broken by load then car number, and the program prints each car count. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Olympic Country RankingCount how many countries beat country K on gold, then silver, then bronze medals, and report its rank. | Easy2 | SortingArray | No attempts yet | 1s | 128 MB | Judgeable |
| DecryptionCount the letters in each sentence ignoring spaces and print the most frequent one, or ? on a tie. | Easy2 | ArrayString | No attempts yet | 1s | 128 MB | Judgeable |
| Ironclad Security AlgorithmYou invert the word permutation defined by the two public keys and apply it to the ciphertext to recover the plaintext. | Easy2 | Hash mapArray | No attempts yet | 1s | 256 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 |
| Sequence Folding GameRepeatedly fold the list by adding symmetric pairs until two numbers remain, then Alice wins when the first is larger. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Gholam's Simple GameStarting from the marked tile and direction, walk n steps bouncing off both ends and count visits to yellow tiles. | Easy2 | SimulationArray | No attempts yet | 1s | 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 |
| Perfect ShuffleInterleave the top and bottom halves of a card list to perform one perfect shuffle for each test case. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| BeeThe program counts logged jobs under each of seven bee work codes and prints each count with its share of the total. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Cuckoo for HashingSimulate cuckoo hashing insertions into two mod-indexed tables with displacement and print the final table contents. | Easy2 | SimulationHash map+1 | No attempts yet | 2s | 128 MB | Judgeable |
| LampGuards patrol in roster order, each toggling the lamps in one arithmetic progression, and you report how many lamps stay on. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Maximum FrequencyGiven N integers, count how many times each value appears and print the largest count. | Easy2 | Hash mapArray | No attempts yet | 2s | 1024 MB | Judgeable |
| RouteCount the maximal runs of level, uphill, and downhill metre sections along the looped jogging route starting at pole 1. | Easy2 | ArrayImplementation | No attempts yet | 2s | 1024 MB | Judgeable |
| VoteEach judge votes for the most interesting game they can afford, and the game with the most votes wins. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Party InvitationSimulate m rounds of removing every person at a multiple of ri from the ordered list and print the survivors in order. | Easy2 | SimulationArray | No attempts yet | 2s | 256 MB | Judgeable |
| Odysseus and the SirensThe program scores every melody under each candidate key by summing note penalties and prints the numbered key with the smallest total. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Turtle GraphicsSimulate a turtle that steps forward and turns on a 64 by 64 grid, then report its final cell and how many cells it visited more than once. | Easy2 | SimulationArray | No attempts yet | 1s | 256 MB | Judgeable |
| Most Chosen NumberPick the number that appears most often in each test case, breaking ties by the smaller number. | Easy2 | ArrayImplementation | No attempts yet | 5s | 256 MB | Judgeable |
| Mushrooms on Half a PizzaGiven mushroom counts on eight circular pizza slices, find the largest total on any four consecutive slices. | Easy2 | Brute forceArray | No attempts yet | 1s | 32 MB | Judgeable |
| Cow RoutingFind the cheapest single flight route on which city A appears before city B, or report -1 when none exists. | Easy2 | ImplementationArray | No attempts yet | 1s | 256 MB | Judgeable |
| Paprika ID CardsSimulate one left-to-right pass of conditional card swaps, then count paprikas whose final card matches their goal. | Easy2 | SimulationArray | No attempts yet | 1s | 256 MB | Judgeable |
| Weather ForecasterClouds drift east one cell per minute, and each cell reports how many minutes until a cloud first arrives, or -1 if none ever does. | Easy2 | SimulationArray | No attempts yet | 1s | 256 MB | Judgeable |
| Reversing basketsApply M given interval reversals in order to baskets numbered 1 to N, then print the final order from the left. | Easy2 | ArraySimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Rotating the basket orderPerform M given segment rotations on baskets numbered 1 to N and print the final left-to-right order. | Easy2 | SimulationArray | No attempts yet | 1s | 256 MB | Judgeable |
| Counting FriendsCount the friends of each of N students from M mutual friendship pairs and print the N totals. | Easy2 | GraphArray | No attempts yet | 1s | 256 MB | Judgeable |
| Inverse Move-to-Front TransformReconstruct the lowercase string from its move-to-front code by simulating the 26-letter list. | Easy2 | SimulationArray | No attempts yet | 2s | 256 MB | Judgeable |
| Entrance ExaminationPick the cutoff n between nmin and nmax with a strict score split that maximizes the gap between the lowest passing and highest failing scores. | Easy2 | ArrayImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Flag QuizPrint the alternatives whose maximum position-wise difference to any other alternative is smallest. | Easy2 | Brute forceArray | No attempts yet | 1s | 256 MB | Judgeable |
| Black FridayGiven each person's die roll, print the number of the person holding the highest roll that no one else rolled, or none. | Easy2 | ArrayImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Moist (Small1)For each deck of names, count how many cards the robot moves to sort the deck into lexicographic order. | Easy2 | ArrayString | No attempts yet | 5s | 512 MB | Judgeable |
| GBus Count (Large)Count, for each queried city, how many of the given inclusive intervals cover it. | Easy2 | Brute forceIntervals+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Card Shuffle (Small)Simulate C segment-to-top cuts on a deck of M ordered cards and report the card at position W. | Easy2 | SimulationArray | No attempts yet | 5s | 512 MB | Judgeable |
| Investing at the MarketChoose a buy month and a later sell month from 12 prices to maximize whole-unit profit, breaking ties by lower buy price. | Easy2 | Brute forceArray | No attempts yet | 5s | 512 MB | Judgeable |
| Odd Man OutGiven an odd-length list of invitation codes where every value appears twice except one, find the value that appears once. | Easy2 | Bit manipulationArray+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Immigrate to the CTP principalityConvert each item between uppercase letters and their alphabet positions (A=1 to Z=26), in the direction given by the mode character. | Easy2 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| StarmanGiven up to 100 year ranges, print the Bowie albums released within each range, in release order, with a count first. | Easy2 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Manhattan TaxiGiven your waiting intersection and up to 100 taxi positions on a 100x100 grid, print the coordinates of the taxi with the smallest Manhattan distance. | Easy2 | ImplementationBrute force+2 | No attempts yet | 2s | 512 MB | Judgeable |
| ChessboardPrint an N by M grid of asterisks and dots where the top left cell is an asterisk and adjacent cells always differ. | Easy2 | ArrayImplementation+2 | No attempts yet | 2s | 512 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 |
| Cleaning StationsGiven weights and a feature matrix, print the indices of the rows whose weighted sum is largest, in ascending order, for each of K data sets. | Easy2 | ImplementationArray+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Dangerous DiveGiven N volunteers and the R identifiers that returned, list the missing identifiers in ascending order, or print * if all returned. | Easy2 | ArrayHash map | No attempts yet | 2s | 512 MB | Judgeable |
| Sub-primeGiven each bank's reserve and a list of debentures between banks, check whether every bank ends with a nonnegative balance after all debentures settle at once. | Easy2 | ArrayImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Enlarging the Cow SignalPrint an M by N grid of dots and X characters with each cell repeated K times in both directions. | Easy2 | ImplementationArray | No attempts yet | 2s | 512 MB | Judgeable |
| Key MakerFor each test case, count how many trash keys have the same cut count and can be deepened, or already match, the customer key. | Easy2 | ArrayImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| GradesGiven a list of grades, compare the midpoint of the maximum and minimum against the overall average, and report whether they differ by less than 1. | Easy2 | ArrayMath+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Refreshment AreaCount the number of D-long horizontal or vertical runs of empty cells in an N by M grid. | Easy2 | ArrayImplementation+2 | No attempts yet | 2s | 512 MB | Judgeable |