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,020 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
ResistanceGiven three color names, map each to its digit or multiplier using a fixed table and print the resulting resistance value.Easy1Hash mapImplementationNo attempts yet2s128 MBJudgeable
Grade Point CalculationRead a letter grade string and print its corresponding fixed grade point value from a lookup table.Easy1ImplementationHash mapNo attempts yet1s128 MBJudgeable
RemaindersRead ten nonnegative integers, compute each mod 42, and print how many distinct remainder values occur.Easy1Hash mapImplementationNo attempts yet1s128 MBJudgeable
Sum of Missing CharactersFor each string, sum the ASCII values of uppercase letters that never appear in it.Easy1StringHash map+1No attempts yet1s128 MBJudgeable
BillingRead item names until EOI and print the total cost of all listed supplies with a dollar sign and two decimals.Easy1Hash mapImplementationNo attempts yet1s128 MBJudgeable
TulipsRead n beds, collect the distinct catalogue numbers present, and print 15000 minus that count.Easy1ArrayHash mapNo 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
Golden Khon KaenCount how many times the word GOLDEN can be formed from each given string of capital letters.Easy1Hash mapNo attempts yet10s64 MBJudgeable
KBO Korean Series Champion NumberGiven the Korean name of a KBO team that won the Korean Series, print the number assigned to that team.Easy1ImplementationString+1No 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
Most Frequent LetterCount letter frequencies in a string, case-insensitively, and print the most common letter in uppercase or a question mark on ties.Easy2Hash mapString+1No attempts yet2s128 MBJudgeable
Basketball GameGiven N surnames, count first letters and print all letters (in order) that start at least five surnames, or PREDAJA if none does.Easy2Hash mapImplementation+1No attempts yet1s128 MBJudgeable
Most Frequent LettersCount lowercase letter frequencies across up to 50 lines of text and print all letters tied for the highest frequency in alphabetical order.Easy2Hash mapString+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
Making AnagramsGiven two lowercase words, compute how many letters must be deleted in total so their remaining letters match as multisets (anagrams).Easy2Hash mapStringNo attempts yet2s128 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
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
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
Refrigerator MagnetsRead lines until END and print each line that contains no repeated letter, ignoring spaces.Easy2ImplementationString+2No 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
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
Travelling SalesmanCount the distinct town names in each week's list and report the total for that week.Easy2Hash mapString+1No attempts yet1s128 MBJudgeable
NoMoPhobiaFor each week, sum de-merit points for each student from misdemeanor codes and list those reaching 100, in first-appearance order.Easy2Hash mapImplementationNo attempts yet1s128 MBJudgeable
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.Easy2ImplementationHash map+2No attempts yet1s128 MBJudgeable
Contest SeatsCount how many participants fail to get their chosen seat, since only the first arrival for a seat can sit there.Easy2ImplementationHash map+1No attempts yet1s128 MBJudgeable
Chess PuzzleFor each board, read the rook coordinates and report SAFE if no two rooks share a row or column, otherwise NOT SAFE.Easy2ImplementationHash map+2No attempts yet1s128 MBJudgeable
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.Easy2ArrayHash map+1No attempts yet1s128 MBJudgeable
Total CountRead fighter names until a line with 0, print each name with its kill count in first-appearance order, then the grand total.Easy2Hash mapImplementation+2No attempts yet1s128 MBJudgeable
PangramRead sentences until a line holding a single asterisk, and print Y if a sentence contains all 26 lowercase letters, otherwise N.Easy2StringHash map+1No attempts yet1s128 MBJudgeable
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.Easy2ArrayHash map+1No attempts yet1s128 MBJudgeable
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".Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Ballot EvaluationSum the given parties' vote percentages and check the sum against an integer n using the guess's comparison operator.Easy2Hash mapImplementation+1No attempts yet1s128 MBJudgeable
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.Easy2StringHash map+2No attempts yet1s128 MBJudgeable
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.Easy2StringImplementation+2No attempts yet1s128 MBJudgeable
I Speak TXTMSGRead lines until TTYL, map each known short form through a fixed table, and echo other lines unchanged.Easy2Hash mapString+1No attempts yet1s128 MBJudgeable
Anagram CheckerDecide whether two phrases are anagrams, ignoring spaces and letters only.Easy2Hash mapString+1No attempts yet1s128 MBJudgeable
Snow CallsConvert each alphanumeric phone number to digits, keep the first 10 digits, and print them in xxx-xxx-xxxx form.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
AnagramsGiven two lowercase words, decide whether one can be rearranged into the other, and print the result with the words.Easy2StringHash map+1No attempts yet1s128 MBJudgeable
CardsA 52-card deck is missing exactly one card; given the other 51 cards as suit and value pairs, output the missing suit and value.Easy2ArrayHash map+2No attempts yet1s1024 MBJudgeable
EntropyRead one line of text, count how often each character appears, and print the Shannon entropy rounded to three decimals.Easy2Hash mapMath+2No attempts yet1s128 MBJudgeable
Untied AirlinesRead each flight's complaint codes, sum the points per passenger, and count how many passengers reach 200 points.Easy2ImplementationHash mapNo attempts yet1s128 MBJudgeable
How Many Distinct LettersFor each line until the terminator '#', count how many distinct alphabet letters appear, ignoring case and non-letters.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
Ant NamesGiven up to 100 lowercase names, print the maximum number of distinct letters found in any single name.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
Guess the SongGiven the title words and the lyrics in order, find the earliest lyric position where at least half of the distinct title words have appeared.Easy2SimulationHash mapNo attempts yet1s128 MBJudgeable
Morse CodeDecode each test case of five space-separated Morse codes into five uppercase letters or digits.Easy2Hash mapStringNo attempts yet1s128 MBJudgeable
Ironclad Security AlgorithmYou invert the word permutation defined by the two public keys and apply it to the ciphertext to recover the plaintext.Easy2Hash mapArrayNo attempts yet1s256 MBJudgeable
MarathonerCount the listed students who finished within 6 hours and report the fastest one, breaking ties by race result order.Easy2ImplementationHash mapNo attempts yet2s64 MBJudgeable
Length and Frequency of SentencesCount the words in each of N sentences and report how often each length occurs in ascending order.Easy2StringHash map+1No attempts yet1s128 MBJudgeable
Cuckoo for HashingSimulate cuckoo hashing insertions into two mod-indexed tables with displacement and print the final table contents.Easy2SimulationHash map+1No attempts yet2s128 MBJudgeable
Maximum FrequencyGiven N integers, count how many times each value appears and print the largest count.Easy2Hash mapArrayNo attempts yet2s1024 MBJudgeable
Word PuzzleDecide for each pair of strings whether the gathered letters can be rearranged to form the original word.Easy2Hash mapStringNo attempts yet3s256 MBJudgeable
Assigning PartnersYou check that every positional pairing is mutual and no student is paired with themselves.Easy2Hash mapImplementationNo attempts yet1s256 MBJudgeable
Pangram CheckerCount how many times each English letter appears in every sentence and print its pangram grade.Easy2StringHash mapNo attempts yet3s256 MBJudgeable
Wait TimeReconstruct message timestamps from the log and sum each friend reply wait time, reporting -1 for a friend with an unanswered message.Easy2SimulationHash mapNo attempts yet1s256 MBJudgeable
Kkung's Girlfriend PlanEach test case gives named condition times and AND-OR combos, and the answer is the smallest combo time where one combo takes its slowest condition.Easy2ImplementationHash map+1No attempts yet1s256 MBJudgeable
Letter CookiesGiven the letters in a box, decide for each query word whether its letters can all be taken from the box.Easy2Hash mapStringNo attempts yet1s256 MBJudgeable
Marko's T9 inputCount how many dictionary words map letter by letter to the given T9 digit string.Easy2StringHash mapNo attempts yet2s64 MBJudgeable
Cities Alice has visitedCount how many different city names appear in each trip log.Easy2Hash mapNo attempts yet1s256 MBJudgeable
Odd Man OutGiven an odd-length list of invitation codes where every value appears twice except one, find the value that appears once.Easy2Bit manipulationArray+1No attempts yet5s512 MBJudgeable
T9 Spelling (Small)Map each letter of a short message to its keypad digit and repeat count, inserting a space between consecutive letters that share the same key.Easy2StringImplementation+2No attempts yet5s512 MBJudgeable
A New AlphabetReplace each English letter with its fixed symbol string from a 26-entry table, leaving all other characters unchanged.Easy2StringHash map+1No attempts yet2s512 MBJudgeable
Dangerous DiveGiven N volunteers and the R identifiers that returned, list the missing identifiers in ascending order, or print * if all returned.Easy2ArrayHash mapNo attempts yet2s512 MBJudgeable
Lost BootsCount how many left-right pairs of boots share the same size, reading several test cases until EOF.Easy2Hash mapImplementationNo attempts yet2s512 MBJudgeable
HolesCount the holes in each of N lines of uppercase text, where B counts as two, A D O P Q R count as one, and the rest count as zero.Easy2StringImplementation+2No attempts yet2s512 MBJudgeable
Country LeaderFor each test case, pick the name with the most distinct letters, breaking ties by lexicographic order where a space sorts before any letter.Easy2StringSorting+2No attempts yet5s512 MBJudgeable
String SetCount how many of M query strings appear in a given set S of N strings.Easy2Hash mapNo attempts yet2s1536 MBJudgeable
Bovine Genomics (Bronze)Count genome positions where the set of characters in spotty cows and the set in plain cows do not overlap.Easy2ImplementationBrute force+1No attempts yet2s512 MBJudgeable
No DuplicatesRead a line of space-separated uppercase words and print yes if no word repeats, or no if any word appears more than once.Easy2StringHash map+1No attempts yet2s512 MBJudgeable
Latin SquaresRead an n by n grid of base-n digit characters and report whether it is a Latin square, and if so whether it is in reduced form.Easy2ImplementationArray+2No attempts yet1s512 MBJudgeable
Atomic MassParse a short chemical formula, look up each element's atomic mass, multiply by any following count, and print the total with two decimals.Easy2StringHash map+2No attempts yet1s512 MBJudgeable
Kiwis vs KangaroosGiven a phrase, score each side by how often its letters appear in KANGAROO or KIWIBIRD, then report the higher score or a tie.Easy2ImplementationString+2No attempts yet2s512 MBJudgeable
PiratesGiven a lowercase word, find the letter with the highest frequency and print that letter with its count.Easy2StringHash map+1No attempts yet2s512 MBJudgeable
Hash collision stringsPrint two length-N strings that differ but have equal Java String hashCode values, using the classic Aa/BB collision with a shared prefix.Easy2StringHash map+2No attempts yet2s512 MBJudgeable
Poker HandGiven five distinct cards, report the largest number of cards sharing one rank.Easy2Hash mapImplementationNo attempts yet2s512 MBJudgeable
ElderTrack which wizard owns the Elder Wand after each duel and count how many distinct wizards ever held it.Easy2SimulationImplementation+1No attempts yet1s512 MBJudgeable
BagsGiven n waste pieces with identifiers, find the minimum number of bags so that each bag holds pieces of only one identifier.Easy2Hash mapImplementation+2No attempts yet1s512 MBJudgeable
CommandFor each of T strings, decide whether it has length 7 and its characters follow the exact pattern AABBABB with exactly two distinct letters.Easy2StringImplementation+1No attempts yet0.5s256 MBJudgeable
Pea Soup and PancakesRead each restaurant's name and menu, then print the first one serving both pea soup and pancakes, or a fixed fallback line if none does.Easy2ImplementationString+2No attempts yet1s512 MBJudgeable
BananaRead a dictionary mapping English words to Minionese words, then translate each of T sentences word by word.Easy2Hash mapString+2No attempts yet2s512 MBJudgeable
Divisionals SpellingGiven n words and a contest with m questions labeled A onward, count how many words use only distinct letters from the first m letters.Easy2ImplementationString+1No attempts yet1s512 MBJudgeable
Student NumbersGiven N equal-length numeric strings, find the smallest suffix length k so that all suffixes of length k remain distinct.Easy3StringBrute force+1No attempts yet2s128 MBJudgeable
Symmetric DifferenceGiven two sets of natural numbers, compute the size of their symmetric difference.Easy3Hash mapArray+1No attempts yet2s256 MBJudgeable
War - Land GrabFor each region's list of soldier army IDs, find the majority element that appears more than half the time, or print SYJKGW if none exists.Easy3ArrayHash mapNo attempts yet10s512 MBJudgeable
BestsellerGiven N book titles sold in a day, find the most frequent title, breaking ties by lexicographically smallest.Easy3Hash mapSorting+1No attempts yet2s128 MBJudgeable
Knight TourCheck whether a given sequence of 36 squares on a 6x6 board forms a valid closed knight's tour with legal moves between consecutive squares and back to the start.Easy3SimulationArray+1No attempts yet2s128 MBJudgeable
Cyclic WordsCount how many words are distinct once each is allowed to be read starting from any position around a circle.Easy3StringBrute force+1No attempts yet2s128 MBJudgeable
I Am Pokemon Master DasomBuild a bidirectional mapping between Pokemon numbers and names, then answer up to 100,000 lookup queries either way.Easy3Hash mapImplementation+1No attempts yet2s256 MBJudgeable
Common PermutationFor each pair of input strings, count letter frequencies and output the multiset intersection sorted alphabetically as the longest common rearranged subsequence.Easy3Hash mapString+1No attempts yet2s128 MBJudgeable
Common NamesGiven two lists of unique lowercase names, find and print the count and sorted list of names common to both.Easy3Hash mapSorting+1No attempts yet2s256 MBJudgeable
Set DifferenceGiven two sets of up to 500,000 natural numbers each, output the count and sorted list of elements present in A but not in B.Easy3Hash mapSorting+1No attempts yet2s256 MBJudgeable
Finding NumbersGiven N integers and M queries, output for each query whether it exists in the array, requiring an efficient lookup method.Easy3Binary searchSorting+1No attempts yet1s128 MBJudgeable
AuctionGiven a sequence of bids, find the least-frequent price (lowest if tied) and output the name of the first bidder who offered that price.Easy3Hash mapImplementation+1No attempts yet2s128 MBJudgeable
Repeated SequenceSimulate a digit-power sequence until it cycles, then output how many distinct values appear before the repetition starts.Easy3SimulationHash map+1No attempts yet2s256 MBJudgeable
Axis-Parallel LinesGiven n points, count how many horizontal or vertical lines pass through at least two of them.Easy3Hash mapArrayNo attempts yet2s128 MBJudgeable
Four DiceGiven N sets of four dice rolls, compute each participant's prize by rules based on matching-face patterns and output the maximum prize.Easy3ImplementationHash map+1No attempts yet1s128 MBJudgeable
Remainder Sequence CycleGiven N and P, simulate the sequence a_{i+1} = a_i*N mod P and output the length of the eventual repeating cycle.Easy3SimulationHash map+1No attempts yet1s128 MBJudgeable
Similar WordsCount how many words differ from the first word's letter multiset by at most one insertion, deletion, or substitution.Easy3Hash mapString+1No attempts yet1s128 MBJudgeable