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 results14,366 problems
TopicsJudge
What Is This Semester's GPA?Compute a weighted GPA from a list of courses, credits, and letter grades, rounded to two decimal places.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
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.Easy2MathGreedy+1No attempts yet1s128 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
Sugar DeliveryFind the minimum number of 3kg and 5kg bags that sum to exactly N kilograms, or -1 if impossible.Easy2GreedyMathNo 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
Maximum Value of a Fraction TableGiven a 2x2 grid of positive integers, find how many 90-degree clockwise rotations (0-3) maximize A/C+B/D, choosing the smallest such count on ties.Easy2Brute forceImplementation+1No attempts yet1s128 MBJudgeable
Difference Between 5 and 6Given two integers, compute the minimum and maximum possible sums after freely swapping digits 5 and 6 in each number.Easy2StringGreedy+1No attempts yet1s128 MBJudgeable
Climbing SnailCompute the number of days for a snail climbing A meters by day and sliding B meters by night to reach a pole of height V.Easy2MathSimulationNo attempts yet0.25s128 MBJudgeable
Monster TruckCount 2x2 blocks in a grid without any building, grouped by how many parked cars they contain (0 to 4).Easy2MatrixImplementationNo attempts yet1s128 MBJudgeable
Why Is KMP Called KMP?Convert a hyphen-joined full name like Knuth-Morris-Pratt into its initials such as KMP.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
CopyrightGiven A songs and a rounded-up average I, find the smallest total copyrighted melodies consistent with ceil(total/A) = I.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
DominoesGiven N, compute the total dot count across all unique dominoes with halves ranging from 0 to N.Easy2MathCombinatoricsNo 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
Year 2009Given a day and month in the year 2009, output the English name of the weekday for that date.Easy2MathImplementationNo 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
Changyeong's DiaryDecode a string by replacing every vowel-p-vowel triple with the single vowel, restoring the original sentence.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Answer Pattern GuessingGiven an answer string, count matches against three fixed repeating guess patterns and report the highest score and who achieved it.Easy2SimulationString+1No attempts yet1s128 MBJudgeable
ATM TransactionsProcess ATM withdrawal or deposit lines, updating balance but rejecting withdrawals that push it below -200, until a sentinel line ends input.Easy2SimulationImplementationNo attempts yet1s128 MBJudgeable
OctalConvert a binary string (up to 100 digits) to octal by padding and grouping bits in threes using the given table.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Chessboard PiecesGiven N straight guillotine cuts through a rectangular board, compute the maximum number of resulting pieces.Easy2MathGreedyNo attempts yet1s128 MBJudgeable
Fourth PointGiven three corners of an axis-aligned rectangle, compute the coordinates of the missing fourth corner.Easy2GeometryMath+1No 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
Changyeong Village Cup ShuffleTrack the position of a ball among three cups after a sequence of swap operations described by characters A, B, C.Easy2SimulationStringNo attempts yet1s128 MBJudgeable
Time Until the WarningGiven current time and a future warning time in a day, compute the wait time as a difference modulo 24 hours, printing 24:00:00 if they match.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Angry ChangyoungFor each match length, decide if it fits diagonally inside a W by H rectangle and print DA or NE accordingly.Easy2GeometryMath+1No attempts yet1s128 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
Number ReversalFor each number, reverse its digits, add to the original, and print YES if the sum is a palindrome, else NO.Easy2StringMath+1No attempts yet1s128 MBJudgeable
Scaled ChessboardPrint a checkerboard of R by C cells where each cell is scaled to an A by B block of X or dot characters.Easy2SimulationImplementationNo attempts yet1s128 MBJudgeable
Making an AcronymBuild an acronym from the first letters of words in a phrase, skipping a fixed list of filler words unless one is the first word.Easy2StringImplementationNo 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
Vigenère Cipher EncryptionEncrypt repeated plaintext lines with a repeating key using a shifted Vigenère cipher until a line with 0 appears.Easy2StringSimulation+1No attempts yet1s128 MBJudgeable
Hamming DistanceFor each test case, count the positions where two equal-length binary strings differ and print the Hamming distance.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Binary NumberFor each given integer, output the positions of all bits set to 1 in its binary representation, from least to most significant.Easy2Bit manipulationImplementationNo attempts yet1s128 MBJudgeable
Hyunwoo the ProfessorFor each given N, output the number of trailing zeros in N! by counting factors of 5.Easy2MathNo attempts yet1s128 MBJudgeable
Automated Telephone ExchangeGiven a 3-digit exchange index n, count pairs of two-digit numbers a,b (00-99) such that n - a - b = 0.Easy2Brute forceMathNo attempts yet1s128 MBJudgeable
ElectrificationGiven switch-to-lamp toggle mappings and a sequence of switch flips, compute and print the final on/off state of each lamp using parity counting.Easy2SimulationBit manipulationNo attempts yet2s256 MBJudgeable
FlatGiven room areas and types, compute total area, total bedroom area, and flat cost using half-weighted balcony area.Easy2ImplementationMathNo attempts yet3s256 MBJudgeable
K-Graph OddityCompute the maximum vertex degree in a graph and output the smallest odd integer greater than or equal to it.Easy2GraphImplementation+1No attempts yet1s128 MBJudgeable
Explicit FormulaGiven 10 binary inputs, evaluate a fixed XOR-of-ORs boolean formula (equivalently just count pairs/triplets with at least one 1 and check parity) and output the result.Easy2Bit manipulationImplementation+1No attempts yet3s256 MBJudgeable
Cutting a BlockGiven a box and n, print the coordinates of n equal slabs formed by evenly spaced cuts along the x-axis, each rounded to 8 decimals.Easy2MathSimulation+1No attempts yet2s64 MBJudgeable
Celebrity JeopardyGiven an equation of the form variable = value, output that same equation unchanged, preserving exact spacing.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Anagram DistanceGiven many word pairs, count letters to delete from both so their letter frequency histograms match, using character counts.Easy2Hash mapString+1No attempts yet1s256 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
NumbersrebmunMap each letter of a company name to its phone keypad digit, then check whether the resulting digit string reads the same forwards and backwards.Easy2StringTwo pointers+1No attempts yet1s128 MBJudgeable
Right TriangleRead triples of side lengths until 0 0 0, and print right if the squares of the two shorter sides sum to the square of the longest, else wrong.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
LogoTrack a turtle's position and heading through forward, backward, left, and right commands, then report the rounded distance from the start.Easy2SimulationGeometry+2No attempts yet1s128 MBJudgeable
Prerequisites?Given Freddie's chosen courses and category minimums, check whether each category has at least the required number of his courses.Easy2ImplementationHash map+2No attempts yet1s128 MBJudgeable
AFC WimbledonGiven the sum and difference of two non-negative scores, print the larger score first, or -1 if no such scores exist.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
Combination LockGiven the dial position and three combination numbers, sum the degrees turned clockwise and counter-clockwise to open the lock.Easy2SimulationMath+1No attempts yet1s128 MBJudgeable
Above AverageFor each class, compute the average score and print the percentage of students scoring strictly above it, rounded to three decimals.Easy2MathImplementationNo attempts yet1s256 MBJudgeable
Time ZonesGiven a time and two time zone abbreviations, compute the equivalent wall-clock time in the second zone.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Hay PointsSum dictionary values of words appearing in each job description line block until a single period terminates it.Easy2Hash mapStringNo attempts yet1s128 MBJudgeable
BabelfishBuild a foreign-to-English word dictionary from the input, then translate each foreign word in the message, printing eh for unknown words.Easy2Hash mapString+1No attempts yet1s128 MBJudgeable
Keyboard Shifted One Key RightReplace every character of each input line with the key immediately to its left on a QWERTY keyboard, leaving spaces unchanged.Easy2Hash mapString+1No attempts yet1s128 MBJudgeable
Dog & GopherGiven the gopher's position, the dog's position, and a list of holes, find the first hole the gopher reaches no later than the dog.Easy2ImplementationGeometryNo attempts yet1s128 MBJudgeable
War for Middle-earthFor each battle, compute the weighted score of both armies from six and seven race counts and report the winner or a tie.Easy2ImplementationMathNo 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
Tetrahedral Stacks of CannonballsFor each of n queries, read the base side length and print the problem number, the side length, and the total cannonballs in a tetrahedral stack of that size.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
Rock Paper Scissors?Count each player's round wins in rock paper scissors across n rounds and print the player with more wins, or TIE.Easy2SimulationImplementationNo 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
Find MultiplesRead n, then read numbers until a sentinel 0, printing for each whether it is a multiple of n.Easy2ImplementationMath+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
Pizza PricingFor each menu of pizzas, find the diameter of the pizza with the lowest cost per square inch.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
Refrigerator MagnetsRead lines until END and print each line that contains no repeated letter, ignoring spaces.Easy2ImplementationString+2No attempts yet1s128 MBJudgeable
VotingFor each recorded vote, check quorum and compare yes and no counts to print the outcome.Easy2ImplementationStringNo attempts yet1s128 MBJudgeable
Mirror ImageFor each word until the terminator '#', print the string reversed with each letter replaced by its mirror image, or INVALID if any letter lacks a mirror.Easy2StringHash map+1No attempts yet1s128 MBJudgeable
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.Easy2ImplementationSorting+2No attempts yet1s128 MBJudgeable
Remove the DuplicatesFor each test case, collapse every run of consecutive equal numbers into a single value and print the result.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
Rock, Paper, ScissorsGiven two equal-length strings of R, P, S moves, count the rounds each player wins.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
ParityRead bit strings whose last bit is missing plus a parity letter, and append the 0 or 1 that makes the parity match.Easy2StringBit manipulation+1No attempts yet1s128 MBJudgeable
The Seven Percent SolutionRead lines until a line with only '#', replacing the seven reserved characters in each with their given percent-encodings.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
QuicksumCompute a weighted checksum for each input line: sum each character's 1-based position times its letter value, where spaces count as 0, until a line with only #.Easy2StringImplementation+2No attempts yet1s128 MBJudgeable
DoublesFor each list of 2 to 15 natural numbers ending in 0, count how many values x have 2x also in the same list.Easy2ArrayHash map+1No attempts yet1s128 MBJudgeable
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.Easy2ArrayPrefix sum+1No attempts yet1s128 MBJudgeable
Haiku ReviewCount vowel runs per haiku line and report whether each line has 5, 7, 5 syllables or the first line that fails.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
St. IvesFor each floating-point n until a terminating 0, print 1 + n + n^2 + n^3 + n^4 rounded to two decimals.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
Fifty Coats of GrayGiven room dimensions, opening sizes, and the area one can covers, compute the total paintable area for n apartments and round up to whole cans.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
Roaming RomansConvert each English-mile distance into Roman miles and paces using a fixed ratio, rounding the pace count to the nearest integer.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
The Twin ParadoxGiven Earth time and spaceship time, compute the ship's average speed as a fraction of light speed and print it to three decimals.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
Parlay WageringSimulate a sequence of parlay wagers: apply each money-line multiplier with truncation, skip ties, and format the final payout with commas.Easy2SimulationImplementation+1No attempts yet1s128 MBJudgeable
A Contesting DecisionGiven each team's submissions and solve times for four problems, compute solved count and penalty, then print the winner.Easy2ImplementationSimulationNo attempts yet1s128 MBJudgeable
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.Easy2ImplementationBrute force+1No attempts yet1s128 MBJudgeable
General Chemistry LabGiven a sequence of temperatures ending with 999, print each temperature's difference from the previous one, rounded to two decimals.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Financial ManagementGiven twelve monthly closing balances, compute the mean and print it rounded to the nearest penny with a dollar sign.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Cantor SetFor each N, print a line of 3^N characters following the Cantor set rule: each third-level block of size 3^k has its middle third blanked, dashes elsewhere.Easy2RecursionImplementation+2No attempts yet1s128 MBJudgeable
Tire DimensionsParse a tire size code and compute its overall circumference from the section width, aspect ratio, and rim diameter.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
Next NumberGiven three distinct integers from an arithmetic or geometric progression, decide which type it is and print the label with the next term.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
FIFA World CupGiven groups, teams per group, advancers per group, and byes, compute total matches played plus teams padded to the next power of two.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Number Guessing GameFor each n0, report whether 3*n0 is odd or even and print n4, the quotient of (n2*3)/9.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
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.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Being Smarty!Given row R and block size N, decide whether the alternating style property P1 or P2 applies to that row.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
The Euclidean ClockGiven two clock times and a radius, find the area of the sector swept by the hour hand between them.Easy2MathGeometry+1No attempts yet1s128 MBJudgeable
ICPC Score Totalizer SoftwareFor each contestant, drop one highest and one lowest judge score, then output the truncated average of the rest.Easy2ImplementationSorting+2No attempts yet1s128 MBJudgeable
SavingsFor each test case, print how many years of multiplying the balance by (1 + B/100) are needed until it first exceeds M.Easy2SimulationMath+2No attempts yet1s128 MBJudgeable
Ah!Compare two strings of the form a...ah and print go if the first has at least as many a characters as the second.Easy2StringImplementationNo attempts yet1s128 MBJudgeable