Curated sets
Interview warm-up
Short whiteboard tasks to get the rust off.
Total results2,493 problems
| Topics | Judge | |||||
|---|---|---|---|---|---|---|
| Uphill RoadGiven a sequence of heights, find the maximum height difference over the longest strictly increasing consecutive run. | Easy2 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Super MarioGiven 10 mushroom scores, pick a prefix sum closest to 100 (preferring the larger one on ties) as Mario's final score. | Easy2 | ArrayBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Maximum Value of a Fraction TableGiven a 2x2 grid of positive integers, find how many 90-degree clockwise rotations (0-3) maximize A/C+B/D, choosing the smallest such count on ties. | Easy2 | Brute forceImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Difference Between 5 and 6Given two integers, compute the minimum and maximum possible sums after freely swapping digits 5 and 6 in each number. | Easy2 | StringGreedy+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Climbing SnailCompute the number of days for a snail climbing A meters by day and sliding B meters by night to reach a pole of height V. | Easy2 | MathSimulation | No attempts yet | 0.25s | 128 MB | Judgeable |
| Monster TruckCount 2x2 blocks in a grid without any building, grouped by how many parked cars they contain (0 to 4). | Easy2 | MatrixImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Why Is KMP Called KMP?Convert a hyphen-joined full name like Knuth-Morris-Pratt into its initials such as KMP. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| CopyrightGiven A songs and a rounded-up average I, find the smallest total copyrighted melodies consistent with ceil(total/A) = I. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| DominoesGiven N, compute the total dot count across all unique dominoes with halves ranging from 0 to N. | Easy2 | MathCombinatorics | No attempts yet | 1s | 128 MB | Judgeable |
| Year 2009Given a day and month in the year 2009, output the English name of the weekday for that date. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| I Am a ChefGiven four scores each for five contestants, output the number and total score of the contestant with the highest sum. | Easy2 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Changyeong's DiaryDecode a string by replacing every vowel-p-vowel triple with the single vowel, restoring the original sentence. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Answer Pattern GuessingGiven an answer string, count matches against three fixed repeating guess patterns and report the highest score and who achieved it. | Easy2 | SimulationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ATM TransactionsProcess ATM withdrawal or deposit lines, updating balance but rejecting withdrawals that push it below -200, until a sentinel line ends input. | Easy2 | SimulationImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| OctalConvert a binary string (up to 100 digits) to octal by padding and grouping bits in threes using the given table. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Fourth PointGiven three corners of an axis-aligned rectangle, compute the coordinates of the missing fourth corner. | Easy2 | GeometryMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Equal-Size Interval ClusteringSort points lexicographically, split them into K consecutive groups of nearly equal size, and print each group's coordinate average. | Easy2 | SortingArray+1 | No attempts yet | 5s | 128 MB | Judgeable |
| Changyeong Village Cup ShuffleTrack the position of a ball among three cups after a sequence of swap operations described by characters A, B, C. | Easy2 | SimulationString | No attempts yet | 1s | 128 MB | Judgeable |
| Time Until the WarningGiven current time and a future warning time in a day, compute the wait time as a difference modulo 24 hours, printing 24:00:00 if they match. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Angry ChangyoungFor each match length, decide if it fits diagonally inside a W by H rectangle and print DA or NE accordingly. | Easy2 | GeometryMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ScannerExpand an R by C character grid by repeating each character ZR times vertically and ZC times horizontally, then print the result. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Snow White and the Seven DwarfsGiven nine distinct numbers, find and print in increasing order the seven of them that sum to exactly 100. | Easy2 | Brute forceArray | No attempts yet | 1s | 128 MB | Judgeable |
| 15-Puzzle DisplacementCompute the total Manhattan distance of each labeled tile from its position in the solved 4x4 15-puzzle board. | Easy2 | ArrayMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Find the Even NumbersFor each test case with seven numbers, output the sum and minimum of the even ones among them. | Easy2 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Number ReversalFor each number, reverse its digits, add to the original, and print YES if the sum is a palindrome, else NO. | Easy2 | StringMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Scaled ChessboardPrint a checkerboard of R by C cells where each cell is scaled to an A by B block of X or dot characters. | Easy2 | SimulationImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Making an AcronymBuild an acronym from the first letters of words in a phrase, skipping a fixed list of filler words unless one is the first word. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| BUHAGiven up to 100 square bomb-range constraints on an A by B grid, count how many cells satisfy all the inside/outside conditions. | Easy2 | ArraySimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Vigenère Cipher EncryptionEncrypt repeated plaintext lines with a repeating key using a shifted Vigenère cipher until a line with 0 appears. | Easy2 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Hamming DistanceFor each test case, count the positions where two equal-length binary strings differ and print the Hamming distance. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Binary NumberFor each given integer, output the positions of all bits set to 1 in its binary representation, from least to most significant. | Easy2 | Bit manipulationImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Hyunwoo the ProfessorFor each given N, output the number of trailing zeros in N! by counting factors of 5. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Automated Telephone ExchangeGiven a 3-digit exchange index n, count pairs of two-digit numbers a,b (00-99) such that n - a - b = 0. | Easy2 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| ElectrificationGiven switch-to-lamp toggle mappings and a sequence of switch flips, compute and print the final on/off state of each lamp using parity counting. | Easy2 | SimulationBit manipulation | No attempts yet | 2s | 256 MB | Judgeable |
| FlatGiven room areas and types, compute total area, total bedroom area, and flat cost using half-weighted balcony area. | Easy2 | ImplementationMath | No attempts yet | 3s | 256 MB | Judgeable |
| K-Graph OddityCompute the maximum vertex degree in a graph and output the smallest odd integer greater than or equal to it. | Easy2 | GraphImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Explicit FormulaGiven 10 binary inputs, evaluate a fixed XOR-of-ORs boolean formula (equivalently just count pairs/triplets with at least one 1 and check parity) and output the result. | Easy2 | Bit manipulationImplementation+1 | No attempts yet | 3s | 256 MB | Judgeable |
| Cutting a BlockGiven a box and n, print the coordinates of n equal slabs formed by evenly spaced cuts along the x-axis, each rounded to 8 decimals. | Easy2 | MathSimulation+1 | No attempts yet | 2s | 64 MB | Judgeable |
| Anagram DistanceGiven many word pairs, count letters to delete from both so their letter frequency histograms match, using character counts. | Easy2 | Hash mapString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| MinesweeperGiven a grid of mines and empty cells, replace each empty cell with the count of mines in its eight neighbors. | Easy2 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Right TriangleRead triples of side lengths until 0 0 0, and print right if the squares of the two shorter sides sum to the square of the longest, else wrong. | Easy2 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| LogoTrack a turtle's position and heading through forward, backward, left, and right commands, then report the rounded distance from the start. | Easy2 | SimulationGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Prerequisites?Given Freddie's chosen courses and category minimums, check whether each category has at least the required number of his courses. | Easy2 | ImplementationHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| AFC WimbledonGiven the sum and difference of two non-negative scores, print the larger score first, or -1 if no such scores exist. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Combination LockGiven the dial position and three combination numbers, sum the degrees turned clockwise and counter-clockwise to open the lock. | Easy2 | SimulationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Hay PointsSum dictionary values of words appearing in each job description line block until a single period terminates it. | Easy2 | Hash mapString | No attempts yet | 1s | 128 MB | Judgeable |
| BabelfishBuild a foreign-to-English word dictionary from the input, then translate each foreign word in the message, printing eh for unknown words. | Easy2 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Always Follow the Rules in ZombielandRead q quotes in order, then answer r lookups by printing the quote at that 1-based index, or "No such rule" if out of range. | Easy2 | ArrayImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Bubble Gum, Bubble Gum, in the Dish, How Many Pieces Do You Wish?Given a list of names arranged in a circle, a starting person, and a count n, find who is at position n in the count. | Easy2 | ArraySimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Number Card GameFor each starting number S, repeatedly replace it with the product of its digits until a single digit appears, printing every value in order. | Easy2 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Refrigerator MagnetsRead lines until END and print each line that contains no repeated letter, ignoring spaces. | Easy2 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | StringHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Gnome SequencingFor each of N triples of beard lengths, decide whether the three values are strictly increasing or strictly decreasing, then print Ordered or Unordered. | Easy2 | ImplementationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| ParityRead bit strings whose last bit is missing plus a parity letter, and append the 0 or 1 that makes the parity match. | Easy2 | StringBit manipulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| QuicksumCompute a weighted checksum for each input line: sum each character's 1-based position times its letter value, where spaces count as 0, until a line with only #. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| DoublesFor each list of 2 to 15 natural numbers ending in 0, count how many values x have 2x also in the same list. | Easy2 | ArrayHash map+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Magnificent MeatballsGiven a circular list of guest meatball counts, find the position k where the sum of positions 1 through k equals the sum of the rest. | Easy2 | ArrayPrefix sum+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Fifty Coats of GrayGiven room dimensions, opening sizes, and the area one can covers, compute the total paintable area for n apartments and round up to whole cans. | Easy2 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Roaming RomansConvert each English-mile distance into Roman miles and paces using a fixed ratio, rounding the pace count to the nearest integer. | Easy2 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Filling Out the TeamFor each player's speed, weight, and strength, print the positions whose limits the player satisfies, in table order, or No positions. | Easy2 | ImplementationBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| General Chemistry LabGiven a sequence of temperatures ending with 999, print each temperature's difference from the previous one, rounded to two decimals. | Easy2 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Cantor SetFor each N, print a line of 3^N characters following the Cantor set rule: each third-level block of size 3^k has its middle third blanked, dashes elsewhere. | Easy2 | RecursionImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Next NumberGiven three distinct integers from an arithmetic or geometric progression, decide which type it is and print the label with the next term. | Easy2 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Number Guessing GameFor each n0, report whether 3*n0 is odd or even and print n4, the quotient of (n2*3)/9. | Easy2 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Judging OlympiaFor each line of six judge grades, discard the highest and lowest and print the average of the remaining four, stopping at the all-zero line. | Easy2 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ICPC Score Totalizer SoftwareFor each contestant, drop one highest and one lowest judge score, then output the truncated average of the rest. | Easy2 | ImplementationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SavingsFor each test case, print how many years of multiplying the balance by (1 + B/100) are needed until it first exceeds M. | Easy2 | SimulationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Ah!Compare two strings of the form a...ah and print go if the first has at least as many a characters as the second. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |