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
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| CDVIIPair each vehicle's enter records with the immediately following exit, charge per-kilometre tolls by start hour plus fees, and print sorted totals in dollars. | Medium4 | SimulationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Crypt Kicker IIOne input line is the pangram 'the quick brown fox jumps over the lazy dog' encrypted by a letter substitution; find it, build the table, and decrypt every line. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Contest ScoreboardGiven judging queue entries, compute each contestant's solved count and penalty time, then print the standings in rank order. | Medium4 | ImplementationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Poker HandsCompare two five-card poker hands and decide which ranks higher, handling all standard categories and tie-breaks. | Medium4 | ImplementationSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Relative RelativesGiven Ted's age of 100 and each descendant's father name plus the father's age at the child's birth, compute every descendant's age and list them oldest first, ties broken by name. | Medium4 | TreeDFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| DuLLGiven program sizes, DLL sizes, and a sequence of program start and exit events, find the peak memory use including loaded DLLs. | Medium4 | SimulationBit manipulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Persistent BitsStarting from a seed S, repeatedly apply (A*X+B) mod C and report, for each of the 16 bit positions, whether it is always 1, always 0, or varies. | Medium4 | Bit manipulationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Electronic Document SecurityProcess a log of ACL +, -, = entries in order and print the final rights for each entity, merging entities with identical rights. | Medium4 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| DNA TranslationFor each DNA strand, try all four readings (forward, reverse, complement, reverse complement), translate the first AUG to the first stop codon, and print the lexicographically greatest valid protein or a failure message. | Medium4 | StringSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Letter Sequence AnalysisRead a text block to EOF and, for each sequence length 1 to 5, list the five most frequent letter sequences with alphabetized ties. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Balanced Budget InitiativeReconcile a checkbook register against a bank statement, flagging missing, repeated, mis-copied, and miscalculated entries. | Medium4 | Hash mapSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| User NamesGenerate unique lowercase user names from full names using fixed truncation and numeric suffix collision rules, printing each result. | Medium4 | StringHash map+2 | No attempts yet | 3s | 256 MB | Judgeable |
| Shortest PrefixesFor each word in a list, find the shortest prefix that matches only that word, counting an exact match as unique even if longer words share it. | Medium4 | TrieString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| A Day at the RacesRead a season of Grand Prix results and print final standings for drivers and teams, breaking ties by countback and then lexicographically. | Medium4 | SimulationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Pablo Squarson's HeadacheGiven how N unit squares are attached one by one to an existing square in one of four directions, compute the width and height of the resulting figure. | Medium4 | SimulationArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Geologic StrataGiven a grid of sediment strata and fossils, assign each fossil the lowest adjacent stratum and check whether every fossil's period matches the target time. | Medium4 | ImplementationMatrix+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Risk AssessmentScore each company from text by applying sentence modifiers to quality words and attributing words to the most recent company name. | Medium4 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Who Is the Winner?Given a log of contest submissions with verdicts and times, compute each contestant's solved count and ICPC-style penalty score, then output them ranked. | Medium4 | ImplementationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Stump SpeechGiven scored key phrases and a speech, sum each phrase's score times its number of occurrences in the speech. | Medium4 | StringString matching+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Pythagorean TriplesGiven up to 50 distinct positive integers, list all Pythagorean triples x<y<z present in the set, sorted lexicographically, or report that none exist. | Medium4 | Hash mapMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Breaking the Vigenère CipherFrom a ciphertext, collect all repeated 3-letter groups and their occurrence distances, then report every key length from 4 to 20 dividing at least 90% of those distances. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Most Frequent SquareGiven up to 30 integer grid points, count all axis-parallel squares formed by four of them and report the side length with the most squares, breaking ties by the largest length. | Medium4 | Brute forceGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| WeddingGiven a friendship graph among n classmates, count everyone within distance 2 of classmate 1. | Medium4 | GraphBFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Product Order TotalsSum the order quantities for each distinct product name, then print each product with its total sorted by name length, then alphabetically. | Medium4 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Soccer LeagueRead a list of soccer match results and output the league table sorted by points, then goal difference, then first appearance in the input. | Medium4 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Book ClubGiven each of N cows' answers to NQ questions, count how many cows match all P given question-answer pairs simultaneously. | Medium4 | Hash mapImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| MasterMindGiven up to 100 guesses with exact and wrong-position counts, find the smallest four-digit secret consistent with all of them, or NONE. | Medium4 | Brute forceImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| DartsCount unordered triples of dart hits (single, double, treble regions, bulls, or misses) whose scores sum to a given turn score. | Medium4 | Brute forceImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Going to Meet SinaGiven up to 10^4 blocked cells on a bounded grid, find the shortest 4-directional path from (0,0) to (X,Y) avoiding all puddles. | Medium4 | BFSGraph+2 | No attempts yet | 1s | 128 MB | Judgeable |
| L-I-N-G-OGiven a secret five-letter word and guesses, print one feedback line per guess using upper-case for exact matches, lower-case for misplaced letters, and periods otherwise. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Mutilated Morse Code CipherApply Ohaver's symmetric Morse cipher: encode each message to dot-dash with a length string, reverse the lengths, and decode back to text. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| N-Credible MazesGiven a dimension n and a list of paths between adjacent lattice points, decide if start and end coordinates are connected. | Medium4 | GraphDFS+2 | No attempts yet | 1s | 128 MB | Judgeable |
| KeywordsGiven keyword profiles with a gap threshold and a list of titles, report for each profile the numbers of titles where some pair of its distinct keywords appears within the threshold. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Pseudo-Random NumbersFor each quadruple (Z, I, M, L), follow the recurrence L = (Z*L + I) mod M and report how many distinct values appear before the sequence starts repeating. | Medium4 | Hash mapSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Volleyball StatsParse volleyball play-by-play lines, track kills, errors, hits, blocks, and digs per player and team, and print formatted reports on demand. | Medium4 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Excuses, Excuses!Find the excuses containing the most keyword occurrences, where keywords match case-insensitively and only as whole words. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Message RoutingSimulate message routing through up to 10 MTAs whose tables use wildcards; report local delivery, routing loops, or unroutable messages. | Medium4 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Making Random NumbersSimulate the middle-square method with four-digit numbers and count how many distinct values appear before the first repeat. | Medium4 | SimulationHash map+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Bingo, Really?!Split the input into letter-only words, count distinct words per game ending at BULLSHIT, and print the running average as an irreducible fraction. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Etaoin ShrdluConcatenate each sample's lines, count overlapping adjacent character pairs, then print the five most frequent digrams with their counts and rounded relative frequencies. | Medium4 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Happy WormCount maximal horizontal and vertical runs of empty cells that are at least 2 long in a field with stones. | Medium4 | SortingImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Boring BusinessSimulate a drill moving on a grid from a given start and fixed pre-existing path; after each command report the position and flag if any visited lattice point was already part of the borehole. | Medium4 | SimulationHash map+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Attack of the CipherTextsGiven one plaintext/ciphertext pair, invert the letter substitution to decrypt a second ciphertext, printing a period for undetermined characters. | Medium4 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Common WordsFor each data set, count word frequencies, find the k-th most common words, and print them alphabetically after a title line. | Medium4 | Hash mapSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Recurring DecimalsFor each (a0, L), iterate the digit-rearrange-and-subtract map until a value repeats, then print the first repeated index j, the repeated value, and the cycle length. | Medium4 | Hash mapSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Ancient CipherGiven two equal-length strings of capital letters, decide whether the first can be obtained from the second by a substitution cipher followed by a permutation. | Medium4 | StringSorting+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Lock ManagerProcess lock requests in order, granting an S or X lock when it conflicts with no granted lock, denying it and blocking the transaction otherwise, and ignoring later requests from blocked transactions. | Medium4 | Hash mapSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Scavenger HuntGiven S-1 ordered pairs of steps from a route of S steps, reconstruct the full sequence of steps in order. | Medium4 | GraphHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| People in the CompanyGiven access-card records of enter and leave events, list the names of employees who are currently inside the office, sorted in reverse alphabetical order. | Medium4 | Hash mapSorting+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Sultan's LandGiven P pillars on an N by N grid, count how many sets of four pillars form the corners of an axis-aligned rectangle. | Medium4 | ArrayHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Sales ReportGiven N sale records of item, salespoint, and quantity, print a table of totals with items as columns and salespoints as rows. | Medium4 | SortingHash map+2 | No attempts yet | 4s | 128 MB | Judgeable |
| ROT13Given a list of lowercase words, count ordered pairs (w1, w2) from the list where w2 equals the ROT13 encoding of w1. | Medium4 | Hash mapString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| GardenCount the number of axis-aligned squares whose four corners are all points from a given set. | Medium4 | Hash mapGeometry+1 | No attempts yet | 3s | 128 MB | Judgeable |
| TrainCount the fewest round trips a train needs to drop its wagons from the back at their assigned cities in order. | Medium4 | GreedyHash map | No attempts yet | 1s | 512 MB | Judgeable |
| Happy PrimesPrint every number up to n that is both prime and happy, where repeated digit-square sums reach 1, one per line in increasing order. | Medium4 | Number theoryHash map+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Longest Balanced Sub-SequenceFind the length of the longest contiguous block with equal counts of positive and negative numbers. | Medium4 | Prefix sumHash map | No attempts yet | 1s | 128 MB | Judgeable |
| uHuntProcess judge submissions in order and after each one report the leader's time and the submitter's rank by personal best, ignoring non-improving resubmissions. | Medium4 | SortingHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 4SUMPick one number from each of four sets of up to 500 integers so the four numbers sum to zero. | Medium4 | Hash map | No attempts yet | 2s | 512 MB | Judgeable |
| Triangles made from linesCount how many triples of the given lines form a triangle by removing triples that contain parallel lines. | Medium4 | Hash mapCombinatorics+1 | No attempts yet | 1s | 128 MB | Judgeable |
| SpectrumMaintain an undirected graph of named targets and answer per-query BFS hop histograms and pairwise hop distances. | Medium4 | BFSGraph+1 | No attempts yet | 3s | 128 MB | Judgeable |
| Colorful ChainCount the contiguous segments that hold exactly the required number of links of each listed color and no other colors. | Medium4 | Sliding windowHash map+1 | No attempts yet | 3s | 512 MB | Judgeable |
| Fib InverseGiven Fibonacci numbers, find each one's index, taking the larger index when two match. | Medium4 | MathHash map+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Remainder Subarray CountCount contiguous intervals whose sum is divisible by M using prefix remainder frequencies. | Medium4 | Prefix sumHash map | No attempts yet | 1s | 256 MB | Judgeable |
| Serves Me RightReplay logins, logouts, restarts, and session timeouts to count distinct users and the highest number logged in at once. | Medium4 | SimulationHash map+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Popping BalloonsPop every balloon from left to right with the fewest rightward arrows that drop one unit after each hit. | Medium4 | GreedyHash map | No attempts yet | 2s | 256 MB | Judgeable |
| RATS sequenceSimulate up to 60 RATS steps per data set and report the first creeper term, the first repeated term, or the last term. | Medium4 | SimulationString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Star trianglesFor each star taken as the right-angle vertex, multiply the counts of other stars sharing its column and its row, then add the products. | Medium4 | Hash mapCombinatorics | No attempts yet | 2s | 256 MB | Judgeable |
| MultigramDecide whether the word splits into two or more equal anagram blocks and print the shortest such block, or -1. | Medium4 | StringHash map | No attempts yet | 1s | 64 MB | Judgeable |
| Subsequences Summing to SevensFind the length of the longest contiguous group of cows whose IDs sum to a multiple of 7. | Medium4 | Prefix sumHash map | No attempts yet | 2s | 512 MB | Judgeable |
| English and French (Small)Assign each unknown sentence to English or French so the number of words appearing in both languages is as small as possible. | Medium4 | Brute forceBit manipulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Charging Chaos (Small)Find the fewest bit positions to flip so the outlet strings match the device strings after reordering. | Medium4 | Brute forceBit manipulation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Rational Number Tree (Small)Given the level-order listing of the rational number tree, find the n-th fraction and the position of a given fraction. | Medium4 | TreeBFS+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Odd Man OutGiven an odd-length list where every number appears twice except one, find the number that appears once. | Medium4 | Bit manipulationHash map | No attempts yet | 5s | 512 MB | Judgeable |
| Decision TreeParse a recursively defined decision tree, then for each animal walk the tree using its features and multiply node weights to get the probability. | Medium4 | TreeRecursion+2 | No attempts yet | 5s | 512 MB | Judgeable |
| Multi-base happiness (small)Find the smallest integer above 1 that reaches 1 under the digit-square-sum process in every base of each test case. | Medium4 | SimulationHash map+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Ceiling FunctionInsert each prototype's values into a binary search tree in order, then count how many distinct tree shapes appear across the prototypes. | Medium4 | TreeImplementation+1 | No attempts yet | 5s | 512 MB | Judgeable |
| DNA PasswordCount the length-|P| substrings of a DNA string that contain at least the required number of each of A, C, G, and T. | Medium4 | Sliding windowString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Harps and TailsFlip any subset of columns of an H/T grid; find the maximum number of rows that can be made all-H. | Medium4 | Hash mapGreedy+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Roman numeral conversionFor each of T inputs, convert a Roman numeral to its value in Arabic numerals or an Arabic numeral between 1 and 3999 to its Roman form. | Medium4 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Evenly Spaced TriplesGiven N distinct positions on a line, count how many triples of points have the middle point exactly halfway between the other two. | Medium4 | Hash mapArray | No attempts yet | 1s | 256 MB | Judgeable |
| SonnetsFor each poem, reduce every line to the vowel sequence after its last stressed syllable and label lines by first occurrence to build a rhyme scheme. | Medium4 | StringHash map+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Galactic ConfederationGiven M planes and N planet positions, count how many planets fall in the most populated region formed by the planes. | Medium4 | GeometryHash map+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Colored CubesCount how many distinct cube colorings appear in each test case, where two cubes match if some rotation makes all six face colors agree. | Medium4 | ImplementationHash map+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Remove DuplicatesRead a space-separated list whose length is not given, keep each value only at its first occurrence, and print the surviving values in order. | Medium4 | Hash mapArray+2 | No attempts yet | 5s | 8 MB | Judgeable |
| Reading a ChordGiven a set of 3 to 5 tones, print every chord name (base chord plus optional tension) whose tone set equals the given set, in ASCII order. | Medium4 | Hash mapMath+2 | No attempts yet | 8s | 512 MB | Judgeable |
| Overwatch World CupOne seat in an N by N grid breaks the rule that every row and column holds each team once; find the seat and the correct shirt. | Medium4 | ImplementationHash map | No attempts yet | 2s | 512 MB | Judgeable |
| Appearance AnalysisGiven a grid of brick separators and windows, count how many distinct window designs exist, where rotations by multiples of 90 degrees count as the same design. | Medium4 | ImplementationMatrix+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Balls and NeedlesGiven K segments in 3D defined by endpoint triples, decide whether they form a closed cycle in space and whether their projections onto the xy-plane form a closed cycle. | Medium4 | GraphUnion-find+2 | No attempts yet | 2s | 512 MB | Judgeable |
| R9KRemove known nicknames and collapse whitespace in each message, then report whether the resulting text has appeared before. | Medium4 | StringHash map+2 | No attempts yet | 2s | 512 MB | Judgeable |
| TunnelGiven the entry order and exit order of N cars through a tunnel, count how many cars must have overtaken another car. | Medium4 | ArrayHash map+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Rank and File (Small)Given all but one of the rows and columns of a valid grid, find the missing list of N heights in increasing order. | Medium4 | Hash mapImplementation | No attempts yet | 5s | 512 MB | Judgeable |
| OvertimeGiven timestamped enter and leave records, count overtime as unmatched leaves plus unmatched enters per name after pairing. | Medium4 | Hash mapStack+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Bovine Genomics (Silver)Count triples of genome positions where no spotty cow and plain cow share the same three characters. | Medium4 | Brute forceHash map+2 | No attempts yet | 2s | 512 MB | Judgeable |
| The fastest road to BanikoaraGiven towns joined by undirected weighted roads, find the shortest travel distance between a named departure town and destination town. | Medium4 | GraphShortest path+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Secret Chamber at Mount RushmoreGiven directed letter translations, decide for each pair of words whether every letter of the first can reach the matching letter of the second. | Medium4 | GraphDFS+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Wookje's Dinner WheelGiven a sequence where each menu number appears exactly twice, find the maximum number of values seen once but not yet seen twice at any point. | Medium4 | ArrayHash map+2 | No attempts yet | 2s | 256 MB | Judgeable |
| Sum of all pairwise productsGiven n integers, compute the sum of x_a * x_b over all pairs with a < b. | Medium4 | MathPrefix sum+2 | No attempts yet | 2s | 512 MB | Judgeable |
| FAStarting from a huge integer x, repeatedly replace it with (first digit) times (digit count) and report whether the sequence eventually cycles forever. | Medium4 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Go Northwest!Given N distinct points, find the probability that two independently drawn points lie on a 45-degree diagonal from each other. | Medium4 | Hash mapMath+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Complete Naebbirac's sequenceGiven a multiset of values 1..K, find the single add, remove, or replace operation that makes every value appear equally often. | Medium4 | ArrayHash map+1 | No attempts yet | 1s | 1024 MB | Judgeable |