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,794 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
Maximum ValueRead nine distinct natural numbers and print the maximum value along with its 1-based position.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Odd NumbersGiven seven natural numbers, print the sum of the odd ones and the smallest odd one, or -1 if none exist.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Average and MedianRead five natural numbers and print their average and median.Easy1SortingArray+1No attempts yet1s128 MBJudgeable
Musical ScaleGiven a permutation of 1 through 8, print whether it is strictly ascending, strictly descending, or otherwise mixed.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Completing a Chess SetGiven counts of six white chess piece types, output how many of each must be added or removed to reach a complete 16-piece set.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Clay BullyFor each class, read each student's block dimensions and name, then print the bully with the largest volume and the victim with the smallest volume.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Spinner Lock SimulationGiven the starting digits of a spinner lock and a sequence of button labels, add each label's digits to the wheels modulo 10 and print the final readout.Easy1SimulationImplementation+2No attempts yet1s128 MBJudgeable
Even Sum Versus Odd SumFor each of up to 50 sequences, add the even numbers and the odd numbers separately and print EVEN, ODD, or TIE based on which sum is larger.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
PyramidsFor each positive base size n until a terminating 0, print the total number of blocks in a pyramid whose layers count down from n to 1.Easy1MathImplementation+2No attempts yet1s128 MBJudgeable
Battle Droid PriceFor each test case, multiply five part quantities by fixed prices, sum them, and print the total with a dollar sign and two decimals.Easy1MathImplementation+2No attempts yet1s128 MBJudgeable
Card GameRead five round scores and print their sum.Easy1ArrayImplementationNo attempts yet1s256 MBJudgeable
SanggeunaldGiven prices for three burgers and two drinks, print the lowest cost of one burger plus one drink minus a 50 won combo discount.Easy1ImplementationMath+2No attempts yet1s128 MBJudgeable
Find the Students Who Didn't SubmitGiven 28 distinct attendance numbers from 1 to 30, print the two missing numbers in increasing order.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Do-it, Do-it-NotFor each test case, compare the two middle digits of an even-length binary string and print Do-it if they match, otherwise Do-it-Not.Easy1StringImplementation+1No attempts yet1s128 MBJudgeable
Sounds fishy!Read four depth readings and print Fish Rising, Fish Diving, Fish At Constant Depth, or No Fish based on their ordering.Easy1ImplementationArrayNo attempts yet2s512 MBJudgeable
Multiple ChoiceRead a student's N answers followed by the N correct answers, and count how many positions match.Easy1ArrayImplementationNo attempts yet2s512 MBJudgeable
The New CCC (Canadian Calorie Counting)Read four menu choices, look up each item's calorie count, and print the total in a fixed sentence.Easy1ImplementationArrayNo attempts yet1s128 MBJudgeable
AlienGiven a point and n axis-aligned rectangles, decide whether any rectangle contains the point, boundaries included.Easy1GeometryImplementation+2No attempts yet2s128 MBJudgeable
TulipsRead n beds, collect the distinct catalogue numbers present, and print 15000 minus that count.Easy1ArrayHash mapNo attempts yet1s128 MBJudgeable
Letter CounterCount how many times each letter appears across the given lines and print nonzero counts from a to z then A to Z.Easy1ArrayStringNo attempts yet1s512 MBJudgeable
WinnersFind the highest score among N competitors and print the letters of all competitors who achieved it.Easy1ArrayNo attempts yet1s512 MBJudgeable
Long TapeChoose a nonempty contiguous segment of the given sequence so its arithmetic mean is as small as possible.Easy1ArrayNo attempts yet1s128 MBJudgeable
FiguresCheck whether any three consecutive figures contain one circle, one square, and one triangle.Easy1Sliding windowArrayNo attempts yet1s128 MBJudgeable
Flipping CoinsCount the heads and tails and flip the coins on the less frequent side so all coins show the same face.Easy1GreedyArrayNo attempts yet1s128 MBJudgeable
GradabaseAdd one to every grade and print only students remaining in grades 1 to 6 for each case.Easy1ImplementationArrayNo attempts yet3s128 MBJudgeable
Rice SackFor each test case, print the heaviest of the five given sack weights in the required case format.Easy1ArrayNo attempts yet1s128 MBJudgeable
Birthday StatisticsCount how many of the n employees were born in each month and print the twelve monthly totals.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
MedianFor each group, print the middle value in input order, or the average of the two middle values when the count is even.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Christmas Gift DrawGiven the gift each guest drew, print for every guest who received the gift they brought.Easy1ArrayNo attempts yet2s512 MBJudgeable
GiftCount the days on which the recorded time is at least k milliseconds faster than the previous day.Easy1ArrayImplementationNo attempts yet2s512 MBJudgeable
Pokémon MasterGiven a Pokedex number up to 718, print the matching Pokemon name and its types in order.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Average ScoreReplace each of the five scores below 40 with 40 and print their average.Easy1ArrayNo attempts yet1s128 MBJudgeable
Longest Run of X'sCount the longest run of consecutive X marks in each hallway and print its length in the required sentence.Easy1ArrayNo attempts yet1s256 MBJudgeable
The fellowship of the ringCount how many of the P punch heights fall within the fair range from waist height W to neck height N.Easy1ArrayNo attempts yet1s256 MBJudgeable
Keystrokes per FingerCount how many times each of the eight fingers presses a key when the given string is typed on the fixed US layout.Easy1ImplementationArrayNo attempts yet1s32 MBJudgeable
Traffic Day BanCount how many of the five given car number digits match the date digit.Easy1ImplementationArrayNo attempts yet1s256 MBJudgeable
Vertical ReadingRead five given words column by column from top to bottom, skipping missing letters in shorter words, and print the letters in that order.Easy1SimulationArray+1No attempts yet1s256 MBJudgeable
Card GameCompare the ten cards of A and B round by round and print A or B for the side with more round wins, or D on a tie.Easy1ArraySimulationNo attempts yet1s256 MBJudgeable
Reversing Card SegmentsReverse ten given segments of a 20-card row that starts in order and print the final arrangement.Easy1ArraySimulationNo attempts yet1s256 MBJudgeable
Count ValueCount how many times the integer v appears among the N given integers.Easy1ArrayNo attempts yet1s256 MBJudgeable
Alphabet CountCount how many times each letter from a to z appears in the given lowercase word.Easy1ArrayNo attempts yet1s256 MBJudgeable
Find the AlphabetGiven a lowercase word of length at most 100, output the 0-based first index of each letter a to z, or -1 when absent.Easy1ArrayStringNo attempts yet1s256 MBJudgeable
Insert BallsFill N baskets by writing ball number k into baskets i through j for each operation, then print all baskets.Easy1ArraySimulationNo attempts yet1s256 MBJudgeable
Swap BallsSwap the balls in the given basket pairs M times and print the final ball in each of the N baskets.Easy1SimulationArrayNo attempts yet1s256 MBJudgeable
Minimum and MaximumRead N integers and print the smallest and the largest separated by a space.Easy1ArrayNo attempts yet1s256 MBJudgeable
Extreme SortCheck whether the given numbers are in non-decreasing order and print yes or no.Easy1ArraySortingNo attempts yet1s256 MBJudgeable
Numbers Smaller Than XPrint the elements of the sequence that are smaller than X in their original order.Easy1ArrayNo attempts yet1s256 MBJudgeable
Professor Lee's ExamPrint the numbers of students whose ten answers exactly match 1, 2, 3, 4, 5, 1, 2, 3, 4, 5 in order.Easy1ImplementationArrayNo attempts yet1s256 MBJudgeable
0 = not cute / 1 = cuteCount the 0 and 1 votes and print whether Junhee is cute based on the majority.Easy1ImplementationArrayNo attempts yet1s2 MBJudgeable
Use Every LetterDecide for each of up to 50 sentences whether it contains every letter a to z, and list the missing letters otherwise.Easy1StringArrayNo attempts yet2s256 MBJudgeable
In the ShowerCount, for each test case, how many of the N bottles need more than E attempts and are empty.Easy1ArrayNo attempts yet1s256 MBJudgeable
Lining Up by NameCheck whether the given player names stand in increasing or decreasing dictionary order and print INCREASING, DECREASING, or NEITHER.Easy1StringArrayNo attempts yet1s256 MBJudgeable
Popularity VoteFor each poll, find the candidate with the most votes and report whether the top count is a majority, a minority, or tied.Easy1ImplementationArrayNo attempts yet2s256 MBJudgeable
CardsTwo cards are compared at a time with the smaller pocketed, so find the largest possible sum of pocketed numbers for the given row.Easy1ArrayNo attempts yet1s32 MBJudgeable
Pokemon GO EvolutionGiven a Pokemon number from 1 to 151, print its evolution candy cost from the table, or -1 when it does not evolve.Easy1ArrayImplementationNo attempts yet1s512 MBJudgeable
Magic TrickFind the card shared by the chosen rows of two 4 by 4 layouts, or report a bad layout or cheating.Easy1ArrayImplementationNo attempts yet5s512 MBJudgeable
Hamming DistanceRead two n-dimensional integer vectors and count the positions where their entries differ.Easy1ImplementationArrayNo attempts yet1s256 MBJudgeable
HandballGiven each player's goal counts across M matches, count how many players scored at least once in every match.Easy1ArrayImplementationNo attempts yet2s512 MBJudgeable
Counting positive integersGiven a list of integers, count how many are strictly greater than zero and print the count.Easy1ImplementationArrayNo attempts yet2s512 MBJudgeable
Final ScoreGiven the rosters of two teams and the names of the goal scorers, count each team's goals and decide which team scored more.Easy1Hash mapImplementation+1No attempts yet2s512 MBJudgeable
Fast A+BRead T pairs of integers from fast input and print each sum on its own line.Easy1ImplementationMath+1No attempts yet1s512 MBJudgeable
Helmet and VestGiven a list of helmet defense values and a list of vest values, print the sum of the best helmet and the best vest.Easy1ArrayImplementation+2No attempts yet1s512 MBJudgeable
Winning ICPCCount how many problems each team fully solved (S = T), then report the team with the most solves, breaking ties by smallest index.Easy1ArrayImplementationNo attempts yet2s512 MBJudgeable
General ElectionSum each candidate's votes across regions and print the candidate number with the largest total.Easy1ArrayImplementationNo attempts yet2s512 MBJudgeable
Overflowing with SweetnessGiven triples a and c, find triple b with components in 1 to 100 such that performing the defined cake operation a cake b yields c.Easy1MathImplementation+2No attempts yet1s256 MBJudgeable
Sort Master Bae JihoonGiven N integers, print the largest value, which is the last element after sorting in ascending order.Easy1ArrayImplementationNo attempts yet1s256 MBJudgeable
Extreme TemperaturesRead lines that pair a date with integer temperatures and print the smallest and largest values across every measurement.Easy1ImplementationArray+2No attempts yet2s512 MBJudgeable
ExamRead three scores and print the sum of the two largest.Easy1ArrayImplementation+1No attempts yet2s512 MBJudgeable
ModeCount how many times each value from 1 to M appears in the sequence and print the largest count.Easy1ImplementationArrayNo attempts yet2s512 MBJudgeable
White SquaresGiven an 8x8 board marked with pieces and empty cells, count how many pieces sit on the white squares of the standard alternating coloring.Easy2ArrayImplementation+1No attempts yet2s128 MBJudgeable
EarringsGiven girl names and 2n-1 confiscation/return records tagged with a number and a letter, find the girl whose number appears only once and thus never got her earring back.Easy2Hash mapArray+1No attempts yet1s128 MBJudgeable
Organizing BooksSimulate packing books into boxes in order, sealing a box once the next book no longer fits, and sum the leftover capacity of every box.Easy2SimulationImplementation+1No attempts yet2s128 MBJudgeable
Internet Cafe Seat RequestsGiven a sequence of seat requests for 100 computers, count how many requests are rejected because the requested seat is already taken.Easy2SimulationArray+1No attempts yet2s128 MBJudgeable
Adjusted AverageGiven N exam scores, rescale each by dividing by the maximum score and multiplying by 100, then output the average of the rescaled scores.Easy2ArrayMath+1No attempts yet2s128 MBJudgeable
Sequence TransformationRepeatedly replace a sequence with its adjacent differences K times and print the resulting shorter sequence.Easy2ArraySimulation+1No attempts yet2s128 MBJudgeable
Trophy DisplayCount how many trophies form a visible prefix-maximum sequence when scanning the row from the left and separately from the right.Easy2ArrayImplementationNo attempts yet2s128 MBJudgeable
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.Easy2GreedyArray+1No attempts yet2s128 MBJudgeable
Weather Intern's Temperature SumGiven N daily temperatures, find the maximum sum over any contiguous window of exactly K days.Easy2Sliding windowArrayNo attempts yet1s128 MBJudgeable
Intelligent Train 2Given boarding and alighting counts at 10 stations, simulate the running passenger total and print its maximum value.Easy2SimulationArrayNo attempts yet1s128 MBJudgeable
Score CalculationCompute a total score from a 0/1 sequence where consecutive correct answers score an increasing running count.Easy2ArraySimulation+1No attempts yet1s128 MBJudgeable
Card GameSimulate 10 rounds of card comparisons between two players, scoring points, and determine the overall winner using the most recent non-tied round as a tiebreaker.Easy2SimulationArrayNo attempts yet1s128 MBJudgeable
Maximum ValueGiven a 9x9 grid of numbers, find the maximum value and print its row and column position.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
Average and ModeGiven ten natural numbers, compute and print their average and the most frequently occurring value.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
Third Largest NumberFor each test case of 10 positive integers, output the third largest distinct-position value in the array.Easy2SortingArrayNo attempts yet1s32 MBJudgeable
Score CalculationGiven 8 distinct problem scores, output the sum of the top 5 and their original indices in increasing order.Easy2SortingArray+1No attempts yet1s128 MBJudgeable
Uphill RoadGiven a sequence of heights, find the maximum height difference over the longest strictly increasing consecutive run.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
Super MarioGiven 10 mushroom scores, pick a prefix sum closest to 100 (preferring the larger one on ties) as Mario's final score.Easy2ArrayBrute force+1No attempts yet1s128 MBJudgeable
Sorting Wooden PiecesSimulate repeated bubble-sort passes on five labeled pieces, printing the arrangement after every swap until sorted.Easy2SimulationSorting+1No attempts yet1s128 MBJudgeable
I Am a ChefGiven four scores each for five contestants, output the number and total score of the contestant with the highest sum.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
Equal-Size Interval ClusteringSort points lexicographically, split them into K consecutive groups of nearly equal size, and print each group's coordinate average.Easy2SortingArray+1No attempts yet5s128 MBJudgeable
ScannerExpand an R by C character grid by repeating each character ZR times vertically and ZC times horizontally, then print the result.Easy2SimulationImplementation+1No attempts yet1s128 MBJudgeable
Snow White and the Seven DwarfsGiven nine distinct numbers, find and print in increasing order the seven of them that sum to exactly 100.Easy2Brute forceArrayNo attempts yet1s128 MBJudgeable
15-Puzzle DisplacementCompute the total Manhattan distance of each labeled tile from its position in the solved 4x4 15-puzzle board.Easy2ArrayMath+1No attempts yet1s128 MBJudgeable
Find the Even NumbersFor each test case with seven numbers, output the sum and minimum of the even ones among them.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
BUHAGiven up to 100 square bomb-range constraints on an A by B grid, count how many cells satisfy all the inside/outside conditions.Easy2ArraySimulation+1No attempts yet1s128 MBJudgeable
MinesweeperGiven a grid of mines and empty cells, replace each empty cell with the count of mines in its eight neighbors.Easy2SimulationImplementation+2No attempts yet1s128 MBJudgeable
Fred's Lotto TicketsGiven up to 100 lotto tickets of 6 numbers each, decide whether every number from 1 to 49 appears on at least one ticket.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
Always Follow the Rules in ZombielandRead q quotes in order, then answer r lookups by printing the quote at that 1-based index, or "No such rule" if out of range.Easy2ArrayImplementation+1No attempts yet1s128 MBJudgeable
Bubble Gum, Bubble Gum, in the Dish, How Many Pieces Do You Wish?Given a list of names arranged in a circle, a starting person, and a count n, find who is at position n in the count.Easy2ArraySimulation+1No attempts yet1s128 MBJudgeable
Number Card GameFor each starting number S, repeatedly replace it with the product of its digits until a single digit appears, printing every value in order.Easy2SimulationImplementation+2No attempts yet1s128 MBJudgeable