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 | |||||
|---|---|---|---|---|---|---|
| Death Knight HeroCount how many of the given ability strings avoid the forbidden substring "CD". | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| National Collegiate Programming Contest Club FederationGiven hotels with per-person prices and weekly capacities, find the cheapest hotel and week that fit all N members within budget B. | Easy2 | Brute forceImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Card CuttingRead each game line of card values up to '*', count odd values for Cheryl and even values for Tania, and print the winner or Draw. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Travelling SalesmanCount the distinct town names in each week's list and report the total for that week. | Easy2 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Jean and Joe's ClothesRead clothing sizes and count how many items go to Joe, Jean, Jane, James, or no one, per visit until N equals 0. | Easy2 | ImplementationSimulation+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 |
| NoMoPhobiaFor each week, sum de-merit points for each student from misdemeanor codes and list those reaching 100, in first-appearance order. | Easy2 | Hash mapImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| RecipesMultiply each recipe amount by a constant and print the result as a reduced integer or mixed fraction. | Easy2 | ImplementationMath+1 | 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 |
| Bailout BonusGiven a list of bailed-out companies, a tax rate, and executives with company and bonus, sum the floor of the taxed fraction for executives at bailed companies. | Easy2 | ImplementationHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Isn't It Funny How a Bear Likes Honey?Given Pooh's weight and the radii of several spherical helium balloons, decide whether their combined lift strictly exceeds his weight. | Easy2 | MathImplementation+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 |
| Aerospace & Mechanical EngineeringGiven each stage's mass, burn time, and thrust, simulate the rocket's vertical motion and report its height when the last stage falls off. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Alphabet DistanceFor each test case, read two equal-length uppercase words and print the alphabet distance between the paired letters at every position. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| String TransformationsApply each letter-to-two-letters rule to the first occurrence of its letter in every word, updating the word after each rule. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Error DetectionFor each 16-bit value and its transmitted check bit, decide whether the check bit matches the parity of 1-bits in the value. | Easy2 | Bit manipulationImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Vigenère CipherEncrypt each given plaintext with the Vigenère cipher, shifting every letter by the aligned repeated keyword letter modulo 26. | Easy2 | StringImplementation+1 | 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 |
| Counting Swann's CoinsPrint numbers 1 through N, replacing multiples of 3 with Dead, of 5 with Man, and of 15 with DeadMan, breaking the line after each word. | Easy2 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Fill the Rowboats!Print the numbers 1 through N, inserting the word Go! after every sixth number and after the last one. | Easy2 | ImplementationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Microsoft LogoPrint the Microsoft logo exactly as shown, matching every character, space, and line break. | Easy2 | Implementation | 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 |
| Greatest Common DivisorRead n pairs of positive integers and print the greatest common divisor of each pair on its own line. | Easy2 | MathNumber theory+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Least Common MultipleFor each of n test cases, read two natural numbers a and b and print their least common multiple. | Easy2 | MathNumber theory+1 | No attempts yet | 1s | 128 MB | Judgeable |
| J-BoxPrint an N by N grid whose border cells are '#' and interior cells are 'J', with a blank line between test cases. | Easy2 | ImplementationSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Mars MathEvaluate a chain of at most three Mars operations (@, %, #) on a starting number and print the result to two decimals. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Letter TrianglesFor each data set, print a triangle of N lines where line i repeats the ith letter in sequence, starting from a given letter and wrapping Z to A. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| DedupeFor each of several strings, collapse every run of consecutive identical letters into a single letter and print the result. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Football TeamRead names one per line and swap every i with e and every I with E in each name. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Garbled MessageRead lines of garbled text until EOF and replace every occurrence of the substring "iiing" with "th", preserving all other characters and line breaks. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| YodaFor each sentence, move its first two words to the end and print the result. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Escape RouteGiven your position and n-1 planet positions, find the closest planet, print both coordinates, and print the distance rounded to two decimals. | Easy2 | Brute forceMath+1 | 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 |
| Target PracticePrint an n by n square border with an X drawn across the inner grid using asterisks. | Easy2 | ImplementationSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Which WayFor each positive integer, convert it to binary and print left, straight, or right depending on whether it has more 0s, equal 0s and 1s, or more 1s. | Easy2 | Bit manipulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Annoying MosquitosGiven up to 100 mosquito positions and up to 10000 swat centers, count how many mosquitos fall within the 101x101 square of at least one swat. | Easy2 | Brute forceImplementation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Vacation HomeworkGiven L vacation days and per-day limits C and D, find the most free days after finishing A Korean and B math pages. | Easy2 | MathGreedy+1 | 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 |
| Time CardGiven clock-in and clock-out times for three employees in h m s form, print each employee's working duration as hours, minutes, and seconds. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ContestGiven 20 scores, split into two groups of 10, output each group's sum of its top 3 scores. | Easy2 | SortingImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| ChangeGiven a purchase amount below 1000 yen paid with a 1000-yen bill, find the minimum number of coins in the change. | Easy2 | GreedyMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Caesar CipherGiven an uppercase word encrypted by shifting each letter forward three positions, shift every letter back by three to recover the original. | Easy2 | StringImplementation+2 | 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 |
| Triangle Validity and ClassificationRead lines of three side lengths, count valid triangles as right, acute, or obtuse, and stop at the first line that is not a triangle. | Easy2 | ImplementationMath+2 | 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 |
| Comparison OperatorsRead C comparison expressions with integer operands, evaluate each, and print "Case N: true" or "Case N: false" until a line with operator E ends input. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| BakuganGiven each player's monster sequence over at most 10 rounds, add points per round and award a one-time 30-point bonus for the first three-in-a-row, then name the winner. | Easy2 | ImplementationSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Hailstone SequencesFor each starting value H up to 500, simulate the Collatz rule and print the largest number that appears before reaching 1. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Factorial BaseRead each factorial-base number, weight digit at position i (from the right, 1-indexed) by i!, and print the decimal value. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| PangramRead sentences until a line holding a single asterisk, and print Y if a sentence contains all 26 lowercase letters, otherwise N. | Easy2 | StringHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Jingle ComposingSplit a slash-delimited composition into measures and count how many note durations sum exactly to 1. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| FeynmanFor each N, count all axis-aligned squares contained in an N by N grid of unit cells, ending at the sentinel 0. | Easy2 | MathImplementation | 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 |
| Roll-call in Woop Woop HighRead each class's answers and count pupils into four groups: correct first try, correct late, never correct, and absent. | Easy2 | ImplementationString+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 |
| Contest TimingShe starts at 11:11 on 11/11. Given the day, hour, and minute she stops, print the minutes elapsed, or -1 if the stop is earlier. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Math PracticeGiven A (0 to 45) and B (1 to 9), find the smallest E in 1 to 62 with E > A and 2^E starting with digit B, or 0 if none exists. | Easy2 | MathBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| String Function EncodingApply the given suffix-plus-string operation C times to each input string and print the results. | Easy2 | StringSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Odd or EvenRead N large integers up to 10^60 and print odd or even for each, judging parity from the last digit. | Easy2 | StringMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Barn EchoesGiven two lowercase strings, find the length of the longest string that is a prefix of one and a suffix of the other. | Easy2 | StringBrute force+2 | 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 |
| Scavenger HuntList every pair (x, y) where x divides P and y divides Q, sorted by x then y. | Easy2 | MathBrute force+1 | 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 |
| IBM Minus OneFor each of n uppercase names, shift every letter to the next letter of the alphabet, wrapping Z to A, and print the result with numbered headers. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Color Me LessRead 16 target RGB colors, then map each following color to the nearest target color by Euclidean distance, breaking ties by earliest appearance. | Easy2 | ImplementationBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Approximating ePrint approximations of e for n from 0 to 9, each rounded to 9 decimals with trailing zeros removed, under a fixed two-line header. | Easy2 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Getting ChordedGiven three note names, decide whether their semitone spacing forms a major or minor chord, then print the echo with the root-named chord or "unrecognized". | Easy2 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| GolfFor each test case, turn a hole's par and John's stroke count into the standard golf score name, with hole-in-one taking priority. | Easy2 | ImplementationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| PerfectionFor each number below 60000, sum its proper divisors and classify it as perfect, deficient, or abundant. | Easy2 | MathNumber theory+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Ballot EvaluationSum the given parties' vote percentages and check the sum against an integer n using the guess's comparison operator. | Easy2 | Hash mapImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Deli DeliFor each of N words, apply the first matching pluralization rule from a list of irregular forms and four suffix rules, then print the result. | Easy2 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Hard to Believe, but True!Read the numbers in each equation backwards, add them, and check whether the sum equals the backwards-read result. | Easy2 | StringMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Next in LineGiven the ages of the youngest and middle of three children in an arithmetic sequence, print the oldest child's age. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Rotating LettersGiven a single uppercase word, decide whether every letter belongs to the set of seven letters that look the same after a 180-degree rotation. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Time on TaskGiven a time limit and chore durations, find the largest number of chores that can be completed in any order. | Easy2 | GreedySorting | No attempts yet | 1s | 128 MB | Judgeable |
| Speed fines are not fine!Given a speed limit and a recorded speed, decide whether the car is speeding and print the matching fine from a three-tier table. | Easy2 | ImplementationMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Icon ScalingRead scaling factor k and print the fixed 3x3 icon with every character expanded into a k-by-k block. | Easy2 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| Big Bang SecretsDecode an uppercase word by shifting each letter backward by S = 3P + K positions, where P is the letter's 1-based position. | Easy2 | ImplementationString+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Sumac SequencesStarting from two integers, repeatedly replace the pair with (second, first minus second) until the difference turns negative and report how many terms appear. | Easy2 | SimulationMath | No attempts yet | 2s | 512 MB | Judgeable |
| UnfriendCount the subsets of nodes in a rooted tree that can be removed, where removing a node forces removal of all its descendants. | Easy2 | TreeBrute force+1 | No attempts yet | 2s | 512 MB | Judgeable |
| English or French?Count the letters t and T against s and S across N lines and print English if t wins, otherwise French. | Easy2 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| What is n, Daddy?Count the ordered pairs (a, b) with 1 <= b <= a <= 5 and possibly a single hand, summing to n. | Easy2 | MathBrute force+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Computer PurchaseGiven n computers with RAM, CPU speed, and disk values, sort by the score 2R + 3S + D and print the top two names, breaking ties by smaller name. | Easy2 | SortingImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| ISBN 1-3-SumGiven the last three digits of an ISBN starting with 9780921418, compute the 1-3-sum and print it. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Old Fishing HoleGiven three point values and a cap, enumerate every catch with at least one fish whose total points stay within the limit, in a specified order. | Easy2 | Brute forceSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Good TimesGiven the time in Ottawa as hour*100+minute, print the local time in seven Canadian cities using fixed offsets, wrapping across midnight. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Body Mass IndexRead a weight and a height, compute weight divided by height squared, and print the BMI category. | Easy2 | MathImplementation | 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 |