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
| Topics | Judge | |||||
|---|---|---|---|---|---|---|
| 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. | Easy1 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Reverse TextRead each test case line and print its characters in reverse order. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Sounds fishy!Read four depth readings and print Fish Rising, Fish Diving, Fish At Constant Depth, or No Fish based on their ordering. | Easy1 | ImplementationArray | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy1 | ImplementationBrute force+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Multiple ChoiceRead a student's N answers followed by the N correct answers, and count how many positions match. | Easy1 | ArrayImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy1 | ImplementationArray | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | GraphImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| RegistrationPrint a fixed registration record: the number 123 on the first line and the string Your_ICPC_Team_Name on the second line. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| TrianglesFor each size n read from input until 0, print a right triangle of stars with n rows, row i having i stars. | Easy1 | ImplementationSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Library CodesFor each book, print horizontal if f times label length plus 2 is at most the book width, otherwise print vertical. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| The Universal OracleGiven one line of text, replace each question's leading 'What' with 'Forty-two' and its final '?' with '.', ignoring non-questions. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| AlienGiven a point and n axis-aligned rectangles, decide whether any rectangle contains the point, boundaries included. | Easy1 | GeometryImplementation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Can You Add This?Read t pairs of integers and print the sum of each pair on its own line. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| TulipsRead n beds, collect the distinct catalogue numbers present, and print 15000 minus that count. | Easy1 | ArrayHash map | No attempts yet | 1s | 128 MB | Judgeable |
| PlaneGiven row and seat counts for business and economy classes, compute the total number of seats on the plane. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| DyslexiaCompare two equal-length letter strings position by position and count the positions where the characters differ, treating case as significant. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| DyslexiaCompare two equal-length strings character by character and count positions where the letters match exactly, including case. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| SumGiven an integer n, compute and print the sum of all integers from 1 to n. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Reverse a Three-Letter WordRead a three-letter word and print its characters in reverse order. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| FactorialRead n and print the ones digit of n factorial. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| LifeguardThe task is to count children farther than k meters from the lifeguard position. | Easy1 | GeometryMath | No attempts yet | 1s | 512 MB | Judgeable |
| Letter CounterCount how many times each letter appears across the given lines and print nonzero counts from a to z then A to Z. | Easy1 | ArrayString | No attempts yet | 1s | 512 MB | Judgeable |
| WinnersFind the highest score among N competitors and print the letters of all competitors who achieved it. | Easy1 | Array | No attempts yet | 1s | 512 MB | Judgeable |
| Long TapeChoose a nonempty contiguous segment of the given sequence so its arithmetic mean is as small as possible. | Easy1 | Array | No attempts yet | 1s | 128 MB | Judgeable |
| FiguresCheck whether any three consecutive figures contain one circle, one square, and one triangle. | Easy1 | Sliding windowArray | No attempts yet | 1s | 128 MB | Judgeable |
| Basketball PlayerGiven current height k, required height w and growth m per hit, compute the fewest hits needed to reach w. | Easy1 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| WężykPrint the numbers 1 to n squared in n rows that alternate between left-to-right and right-to-left order. | Easy1 | SimulationMatrix | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Flipping CoinsCount the heads and tails and flip the coins on the less frequent side so all coins show the same face. | Easy1 | GreedyArray | No attempts yet | 1s | 128 MB | Judgeable |
| SticksGiven three stick lengths, print 2 if they form an equilateral triangle, 1 if only a right triangle, and 0 otherwise. | Easy1 | MathGeometry | No attempts yet | 1s | 128 MB | Judgeable |
| Mountain ShelterCompute the maximum number of dominoes that fit in a W by K grid for up to 10 test cases. | Easy1 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Caesar CipherGiven the encrypted message and its original first letter, recover the shift and decode the full message. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| StrollGiven a walk of N, S, E and W steps on a grid, compute the Manhattan distance from the endpoint back to the start. | Easy1 | SimulationMath | No attempts yet | 2s | 128 MB | Judgeable |
| 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. | Easy1 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| HeptathlonThe program converts seven event records into scores with the given formulas and prints the total for each test case. | Easy1 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| OX QuizScore each O by the length of its unbroken run of O characters and print the total for each test case. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Pennant RacePrint the team with the highest winning percentage, computed as wins divided by wins plus losses plus ties. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Letter BankDecide whether the second word uses exactly the letters of the first word, each at least once. | Easy1 | Hash mapString | No attempts yet | 1s | 128 MB | Judgeable |
| Plot of LandGiven N bead positions, compute the area of the smallest axis-aligned rectangle that contains them all. | Easy1 | GeometryImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Grocery ShoppingPick the crab stick bag with the highest grams per won, breaking ties by the lowest price. | Easy1 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| A Famous Line That Makes No SensePrint the fixed Korean line exactly with no input and no extra spaces. | Easy1 | Implementation | No attempts yet | 1s | 512 MB | Judgeable |
| Score TallyDrop the highest and lowest of five judge scores, print KIN when the remaining three span 4 or more, else print their sum. | Easy1 | SortingImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| AdditionAdd up N small natural numbers for each test case and print each sum on its own line. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| First and Last LetterPrint the first and last letter of each given uppercase string, doubling the letter for length 1. | Easy1 | String | No attempts yet | 1s | 128 MB | Judgeable |
| Reverse Each WordFor each of T sentences, print the words in the same order with the letters inside every word reversed. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | SimulationString | No attempts yet | 1s | 128 MB | Judgeable |
| GradabaseAdd one to every grade and print only students remaining in grades 1 to 6 for each case. | Easy1 | ImplementationArray | No attempts yet | 3s | 128 MB | Judgeable |
| JengaCheck each three-block row for two adjacent missing blocks and report whether each tower stands. | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| DiceAdd the two dice values in each test case and print the sum with its case number. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Grading ExamsCount how many answers differ between the answer key and the student's responses for each test case. | Easy1 | String | No attempts yet | 1s | 128 MB | Judgeable |
| Ant EntrapmentTrack the minimum and maximum X and Y over the ants and report the area and perimeter of that bounding rectangle. | Easy1 | ImplementationMath | No attempts yet | 3s | 256 MB | Judgeable |
| Math TutoringRead each polynomial's degree and coefficients and print the coefficients of its derivative in the same format. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Practice: Roll CallRewrite each first and last name pair as one line in Last, First order with a case number. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Hello JudgePrint Hello World, Judge i! for line numbers 1 to N given N. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| How much?Add the base car price to each option's quantity times unit price for every test case. | Easy1 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Exam GradeRead an integer score from 0 to 100 and print the grade A, B, C, D, or F for its range. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Beautiful YekaterinburgGiven position D from 1 to 4, print the D-th digit of the year Yekaterinburg was founded. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Arabic and EnglishSwap the words before and after the single English word in each mixed line and print lines with no English word unchanged. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Fraud BustersMatch each 9-character database code against the scanned code, treating every star as a wildcard, and print the matches in input order. | Easy1 | String matchingImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| PSU CampusesStarting and ending at Hatyai, sum the pairwise table distances along each given campus visit order. | Easy1 | Simulation | No attempts yet | 1s | 128 MB | Judgeable |
| Quadrants and axesCount how many of n points fall in each of the four quadrants and how many lie on an axis. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Cabin BaggageDecide for each bag whether it meets the size and weight limits, print 1 or 0 per bag, then print the total count. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | ImplementationMatrix | No attempts yet | 1s | 128 MB | Judgeable |
| Balloon ColorsCheck whether the first color differs from X and the last color differs from Y, then print BOTH, EASY, HARD, or OKAY. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Star Wars logoPrint the fixed 11-line Star Wars ASCII logo exactly, keeping all leading spaces. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Naboo Fleet DataPrint the fixed Naboo fleet table with four left-aligned columns of the given widths. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Sahur and Imsa'Given T timestamps, print the time 45 minutes earlier for each, wrapping past midnight. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Rice SackFor each test case, print the heaviest of the five given sack weights in the required case format. | Easy1 | Array | No attempts yet | 1s | 128 MB | Judgeable |
| Sum of Odd NumbersSum all odd integers from 1 to the given odd N for each test case. | Easy1 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Right TriangleGiven three side lengths per test case in any order, decide whether they form a right triangle. | Easy1 | MathSorting | No attempts yet | 1s | 128 MB | Judgeable |
| QuadrantsRead points until 0 0 and print Q1 to Q4 from the signs of x and y, or AXIS on an axis. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| ID KeyAdd the digit sum of each 13-digit ID to ten times its last three digits, then keep four digits as the key. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Max VolumeCompute the volume of each cone, cylinder, and sphere with pi as 3.14159 and print the largest value rounded to three decimals. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Birthday StatisticsCount how many of the n employees were born in each month and print the twelve monthly totals. | Easy1 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| MedianFor each group, print the middle value in input order, or the average of the two middle values when the count is even. | Easy1 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Encoding Binary NumbersEncode each binary string as run lengths followed by digits and print the result per line. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Christmas Gift DrawGiven the gift each guest drew, print for every guest who received the gift they brought. | Easy1 | Array | No attempts yet | 2s | 512 MB | Judgeable |
| GiftCount the days on which the recorded time is at least k milliseconds faster than the previous day. | Easy1 | ArrayImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| Morton NumbersRead integers x and y and print their Morton number, built by interleaving the bits of x and y. | Easy1 | Bit manipulation | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy1 | Bit manipulationString | No attempts yet | 1s | 128 MB | Judgeable |
| NICE check letterRead seven digits, compute the weighted sum modulo 11, and print the mapped check letter. | Easy1 | ImplementationMath | No attempts yet | 2s | 1024 MB | Judgeable |
| Coin tossingCount each game's correct calls for the first player and misses for the second player, then print both names with their scores. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Hide those lettersThe program replaces every occurrence of two given letters in both cases with underscores. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Pokémon MasterGiven a Pokedex number up to 718, print the matching Pokemon name and its types in order. | Easy1 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Average ScoreReplace each of the five scores below 40 with 40 and print their average. | Easy1 | Array | No attempts yet | 1s | 128 MB | Judgeable |
| Most Frequent Smallest NumberPrint how many integers lie strictly between the two given integers, then list them in ascending order. | Easy1 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| Classifying TrianglesRead three angles and print Equilateral, Isosceles, Scalene, or Error from their sum and equal angles. | Easy1 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| Vote CountCount the votes for A and B and print the winner, or Tie when the counts are equal. | Easy1 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| 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. | Easy1 | Simulation | No attempts yet | 1s | 256 MB | Judgeable |
| SnacksCompute K times N minus M, or zero when the money on hand covers the total snack price. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| NFC West and North StandingsPrint the fixed NFC West and NFC North standings exactly as specified with no input. | Easy1 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| Print a CatPrint the exact ASCII art of a cat with no input. | Easy1 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| Print a DogPrint the given ASCII art dog figure exactly with no input. | Easy1 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| Dominant SpeciesFor each area, tally the weighted predator sightings and print the unique top scorer or report no dominant species. | Easy1 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| Halloween CandySplit c candies evenly among v siblings so each gets the same count and the father keeps the remainder. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| Coupon DiscountApply a 20 percent coupon to each listed price and print the discounted price rounded to two decimals. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |