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
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
Reverse TextRead each test case line and print its characters in reverse order.Easy1StringImplementationNo 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
Which Alien?Given the number of antennae and eyes a witness saw, print the names of all alien species whose ranges match, in the order given.Easy1ImplementationBrute force+1No 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
Roll the DiceCount ordered pairs (a, b) with a from 1 to m, b from 1 to n, and a + b = 10, then print the count with singular or plural wording.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
A graph that times out coloring backtrackingPrint one fixed graph: a 55-vertex clique joined by a path, chosen to make a backtracking coloring solver time out.Easy1GraphImplementation+1No attempts yet1s128 MBJudgeable
RegistrationPrint a fixed registration record: the number 123 on the first line and the string Your_ICPC_Team_Name on the second line.Easy1ImplementationNo attempts yet1s128 MBJudgeable
TrianglesFor each size n read from input until 0, print a right triangle of stars with n rows, row i having i stars.Easy1ImplementationSimulationNo attempts yet1s128 MBJudgeable
Library CodesFor each book, print horizontal if f times label length plus 2 is at most the book width, otherwise print vertical.Easy1ImplementationNo attempts yet1s128 MBJudgeable
The Universal OracleGiven one line of text, replace each question's leading 'What' with 'Forty-two' and its final '?' with '.', ignoring non-questions.Easy1StringImplementationNo 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
Can You Add This?Read t pairs of integers and print the sum of each pair on its own line.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
TulipsRead n beds, collect the distinct catalogue numbers present, and print 15000 minus that count.Easy1ArrayHash mapNo attempts yet1s128 MBJudgeable
PlaneGiven row and seat counts for business and economy classes, compute the total number of seats on the plane.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
DyslexiaCompare two equal-length letter strings position by position and count the positions where the characters differ, treating case as significant.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
DyslexiaCompare two equal-length strings character by character and count positions where the letters match exactly, including case.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
SumGiven an integer n, compute and print the sum of all integers from 1 to n.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Reverse a Three-Letter WordRead a three-letter word and print its characters in reverse order.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
FactorialRead n and print the ones digit of n factorial.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
LifeguardThe task is to count children farther than k meters from the lifeguard position.Easy1GeometryMathNo attempts yet1s512 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
Basketball PlayerGiven current height k, required height w and growth m per hit, compute the fewest hits needed to reach w.Easy1MathNo attempts yet1s128 MBJudgeable
WężykPrint the numbers 1 to n squared in n rows that alternate between left-to-right and right-to-left order.Easy1SimulationMatrixNo attempts yet1s128 MBJudgeable
Sign of OperationChoose the operator among +, -, and * that gives the largest value for a and b, and print the expression or NIE on a tie.Easy1MathImplementationNo 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
SticksGiven three stick lengths, print 2 if they form an equilateral triangle, 1 if only a right triangle, and 0 otherwise.Easy1MathGeometryNo attempts yet1s128 MBJudgeable
Mountain ShelterCompute the maximum number of dominoes that fit in a W by K grid for up to 10 test cases.Easy1MathNo attempts yet1s128 MBJudgeable
Caesar CipherGiven the encrypted message and its original first letter, recover the shift and decode the full message.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
StrollGiven a walk of N, S, E and W steps on a grid, compute the Manhattan distance from the endpoint back to the start.Easy1SimulationMathNo attempts yet2s128 MBJudgeable
Trial Task 2Given n scored rounds plus one trial round with 2 to 3 problems each, print the smallest and largest possible total problem counts.Easy1MathNo attempts yet1s128 MBJudgeable
HeptathlonThe program converts seven event records into scores with the given formulas and prints the total for each test case.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
OX QuizScore each O by the length of its unbroken run of O characters and print the total for each test case.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
Pennant RacePrint the team with the highest winning percentage, computed as wins divided by wins plus losses plus ties.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Letter BankDecide whether the second word uses exactly the letters of the first word, each at least once.Easy1Hash mapStringNo attempts yet1s128 MBJudgeable
Plot of LandGiven N bead positions, compute the area of the smallest axis-aligned rectangle that contains them all.Easy1GeometryImplementationNo attempts yet1s128 MBJudgeable
Grocery ShoppingPick the crab stick bag with the highest grams per won, breaking ties by the lowest price.Easy1Brute forceMathNo attempts yet1s128 MBJudgeable
A Famous Line That Makes No SensePrint the fixed Korean line exactly with no input and no extra spaces.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Score TallyDrop the highest and lowest of five judge scores, print KIN when the remaining three span 4 or more, else print their sum.Easy1SortingImplementationNo attempts yet1s128 MBJudgeable
AdditionAdd up N small natural numbers for each test case and print each sum on its own line.Easy1ImplementationNo attempts yet1s128 MBJudgeable
First and Last LetterPrint the first and last letter of each given uppercase string, doubling the letter for length 1.Easy1StringNo attempts yet1s128 MBJudgeable
Reverse Each WordFor each of T sentences, print the words in the same order with the letters inside every word reversed.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Erasing a File for GoodDecide if the second bit string is the first with every bit flipped N times, so it must equal the first for even N and its complement for odd N.Easy1SimulationStringNo 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
JengaCheck each three-block row for two adjacent missing blocks and report whether each tower stands.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
DiceAdd the two dice values in each test case and print the sum with its case number.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Grading ExamsCount how many answers differ between the answer key and the student's responses for each test case.Easy1StringNo attempts yet1s128 MBJudgeable
Ant EntrapmentTrack the minimum and maximum X and Y over the ants and report the area and perimeter of that bounding rectangle.Easy1ImplementationMathNo attempts yet3s256 MBJudgeable
Math TutoringRead each polynomial's degree and coefficients and print the coefficients of its derivative in the same format.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Practice: Roll CallRewrite each first and last name pair as one line in Last, First order with a case number.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Hello JudgePrint Hello World, Judge i! for line numbers 1 to N given N.Easy1ImplementationNo attempts yet1s128 MBJudgeable
How much?Add the base car price to each option's quantity times unit price for every test case.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
Find the missing pagesGiven a booklet of N pages and a page P, print the other three pages on the same folded sheet in ascending order.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Exam GradeRead an integer score from 0 to 100 and print the grade A, B, C, D, or F for its range.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Kkung's Space TripCount the ships that reach the destination by checking whether each ship's fuel covers its burn rate over the travel time.Easy1MathImplementationNo attempts yet2s128 MBJudgeable
Beautiful YekaterinburgGiven position D from 1 to 4, print the D-th digit of the year Yekaterinburg was founded.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Arabic and EnglishSwap the words before and after the single English word in each mixed line and print lines with no English word unchanged.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Fraud BustersMatch each 9-character database code against the scanned code, treating every star as a wildcard, and print the matches in input order.Easy1String matchingImplementationNo attempts yet1s128 MBJudgeable
PSU CampusesStarting and ending at Hatyai, sum the pairwise table distances along each given campus visit order.Easy1SimulationNo attempts yet1s128 MBJudgeable
Quadrants and axesCount how many of n points fall in each of the four quadrants and how many lie on an axis.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Cabin BaggageDecide for each bag whether it meets the size and weight limits, print 1 or 0 per bag, then print the total count.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Crossword puzzle decorationSurround the M by N letter grid with the given padding and fill the added cells with alternating # and . by row plus column parity.Easy1ImplementationMatrixNo attempts yet1s128 MBJudgeable
Balloon ColorsCheck whether the first color differs from X and the last color differs from Y, then print BOTH, EASY, HARD, or OKAY.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Star Wars logoPrint the fixed 11-line Star Wars ASCII logo exactly, keeping all leading spaces.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Naboo Fleet DataPrint the fixed Naboo fleet table with four left-aligned columns of the given widths.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Sahur and Imsa'Given T timestamps, print the time 45 minutes earlier for each, wrapping past midnight.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Rice SackFor each test case, print the heaviest of the five given sack weights in the required case format.Easy1ArrayNo attempts yet1s128 MBJudgeable
Sum of Odd NumbersSum all odd integers from 1 to the given odd N for each test case.Easy1MathNo attempts yet1s128 MBJudgeable
Right TriangleGiven three side lengths per test case in any order, decide whether they form a right triangle.Easy1MathSortingNo attempts yet1s128 MBJudgeable
QuadrantsRead points until 0 0 and print Q1 to Q4 from the signs of x and y, or AXIS on an axis.Easy1ImplementationNo attempts yet1s128 MBJudgeable
ID KeyAdd the digit sum of each 13-digit ID to ten times its last three digits, then keep four digits as the key.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Max VolumeCompute the volume of each cone, cylinder, and sphere with pi as 3.14159 and print the largest value rounded to three decimals.Easy1MathImplementationNo 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
Encoding Binary NumbersEncode each binary string as run lengths followed by digits and print the result per line.Easy1StringImplementationNo 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
Morton NumbersRead integers x and y and print their Morton number, built by interleaving the bits of x and y.Easy1Bit manipulationNo attempts yet2s512 MBJudgeable
Gray codeConvert an n-bit binary string to its standard Gray code by copying the first bit and adding each adjacent pair of bits without carry.Easy1Bit manipulationStringNo attempts yet1s128 MBJudgeable
NICE check letterRead seven digits, compute the weighted sum modulo 11, and print the mapped check letter.Easy1ImplementationMathNo attempts yet2s1024 MBJudgeable
Coin tossingCount each game's correct calls for the first player and misses for the second player, then print both names with their scores.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Hide those lettersThe program replaces every occurrence of two given letters in both cases with underscores.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Filling in the missing rectangle valueEach line gives a rectangle's length, width and area with one value replaced by 0, and you compute and print the missing value.Easy1MathImplementationNo attempts yet1s128 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
Most Frequent Smallest NumberPrint how many integers lie strictly between the two given integers, then list them in ascending order.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Classifying TrianglesRead three angles and print Equilateral, Isosceles, Scalene, or Error from their sum and equal angles.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Vote CountCount the votes for A and B and print the winner, or Tie when the counts are equal.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Dice DuelBoth players start with 100 points, and in each round the player with the lower die loses points equal to the opponent's roll.Easy1SimulationNo attempts yet1s256 MBJudgeable
SnacksCompute K times N minus M, or zero when the money on hand covers the total snack price.Easy1MathNo attempts yet1s256 MBJudgeable
NFC West and North StandingsPrint the fixed NFC West and NFC North standings exactly as specified with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Print a CatPrint the exact ASCII art of a cat with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Print a DogPrint the given ASCII art dog figure exactly with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Dominant SpeciesFor each area, tally the weighted predator sightings and print the unique top scorer or report no dominant species.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Halloween CandySplit c candies evenly among v siblings so each gets the same count and the father keeps the remainder.Easy1MathNo attempts yet1s256 MBJudgeable
Coupon DiscountApply a 20 percent coupon to each listed price and print the discounted price rounded to two decimals.Easy1MathNo attempts yet1s256 MBJudgeable