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 results6,398 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
Read Phone Number (Small)Split each digit string into the given group lengths and read each run of equal digits with count words such as double and triple.Easy2SimulationString+1No attempts yet5s512 MBJudgeable
Tic-Tac-Toe-Tomek (Small)Given a 4 by 4 tic-tac-toe board with a wildcard T, report whether X won, O won, the game is a draw, or play continues.Easy2ImplementationMatrixNo attempts yet5s512 MBJudgeable
Tic-Tac-Toe-Tomek (Large)Given a 4x4 tic-tac-toe board with a wildcard T, report whether X won, O won, the game is a draw, or play continues.Easy2ImplementationBrute force+1No attempts yet5s512 MBJudgeable
Proprietary ProblemA product key entry field is shown; the task appears to require validating or generating a key in the format XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.Easy2StringImplementationNo attempts yet1s1024 MBJudgeable
Dr. Spaceman's height algorithmCompute a child height range from both parents' heights and the child sex, then round both ends inward to whole inches.Easy2ImplementationMathNo attempts yet5s512 MBJudgeable
Program within a Program (Small)Given N, output the fixed 27-line robot program with nine lines filled in from the binary digits of N.Easy2ImplementationNo attempts yet5s512 MBJudgeable
Reverse Word OrderGiven N lines of space-separated words, print each line's words in reverse order prefixed with the case number.Easy2StringImplementationNo attempts yet5s512 MBJudgeable
Reverse Words (Large)Read each line of words and print the words in reverse order, prefixed by the case number.Easy2StringImplementationNo 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
Immigrate to the CTP principalityConvert each item between uppercase letters and their alphabet positions (A=1 to Z=26), in the direction given by the mode character.Easy2ImplementationString+2No attempts yet1s128 MBJudgeable
Mini Fantasy WarFor each character, add gear changes to the four base stats, clamp HP and MP to at least 1 and attack to at least 0, then print the weighted combat power.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
StarmanGiven up to 100 year ranges, print the Bowie albums released within each range, in release order, with a count first.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
Bitwise Operations on Binary NumbersGiven two equal-length binary strings, output their bitwise AND, OR, XOR, and the complemented forms of each, keeping length and leading zeros.Easy2StringBit manipulation+1No attempts yet2s512 MBJudgeable
Changyong's ClockTrack a clock's time on a 24-hour dial, turning it forward or backward by c seconds and answering queries for the current time.Easy2SimulationMath+1No attempts yet1s512 MBJudgeable
LobbyGiven the seat counts of two parties, find how many independents must vote yes for a strict majority.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
CamerasRead n eight-character plates and print each one that matches a fixed pattern of digits and a capital letter, in input order.Easy2StringImplementation+1No attempts yet2s512 MBJudgeable
Three SumsFor each N, print the sum of the first N positive integers, the first N odd numbers, and the first N even numbers.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
FormulaGiven triangle vertex coordinates and a measured incircle radius, compute the radius from the formula and print the percentage difference.Easy2GeometryMath+1No attempts yet2s512 MBJudgeable
Adding god to nicknamesGiven N nicknames split into syllables by spaces, replace the first syllable with god and print the result.Easy2StringImplementationNo attempts yet1s512 MBJudgeable
Router 4Print the fixed two-layer router built from N inputs, r merge nodes, r split nodes, and N outputs, with M = 2N + r^2 connections.Easy2ImplementationSimulationNo attempts yet2s512 MBJudgeable
Manhattan TaxiGiven your waiting intersection and up to 100 taxi positions on a 100x100 grid, print the coordinates of the taxi with the smallest Manhattan distance.Easy2ImplementationBrute force+2No attempts yet2s512 MBJudgeable
MatchesFor each match length, decide whether it fits in a W by H box, meaning its length is at most the diagonal sqrt(W^2+H^2).Easy2GeometryMath+1No attempts yet2s512 MBJudgeable
Chop CupTrack which of three cups hides the ball after a sequence of swaps given as letters A, B, and C.Easy2SimulationImplementationNo attempts yet2s512 MBJudgeable
Tic Tac ToeRead a 3x3 board of X, O, and dots and print YES if some row, column, or diagonal has three equal non-dot symbols.Easy2ImplementationMatrix+1No attempts yet2s512 MBJudgeable
The real Manhattan distanceGiven two points (x, y, floor), compute the walking distance: down from each floor, plus Manhattan street distance.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
PalindromeGiven a lowercase word of at most 20 characters, decide whether it reads the same forwards and backwards.Easy2StringTwo pointers+1No attempts yet2s512 MBJudgeable
Collatz SequenceStarting from n, repeatedly apply the Collatz rule (halve evens, 3n+1 for odds) and print every value from n down to 1 on one line.Easy2SimulationImplementation+1No attempts yet2s512 MBJudgeable
ChessboardPrint an N by M grid of asterisks and dots where the top left cell is an asterisk and adjacent cells always differ.Easy2ArrayImplementation+2No attempts yet2s512 MBJudgeable
Least Common MultipleGiven two integers below 100,000,000, print their least common multiple, which can exceed the 32-bit range.Easy2MathNumber theory+1No attempts yet2s512 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
Quick EstimatesRead N integers up to 10^100 and print the number of digits in each, counting 0 as one digit.Easy2StringMath+1No attempts yet2s512 MBJudgeable
Room AssignmentCount boys and girls per grade and sum the ceiling of each count divided by the room capacity K.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
Jumbled CompassGiven two compass directions from 0 to 359, print the signed rotation with the smallest magnitude that moves the needle from the first direction to the second, breaking ties toward clockwise.Easy2MathImplementation+1No attempts yet2s512 MBJudgeable
Four Arithmetic OperationsEach line gives an expression a op b = c with single-digit spacing, and you print correct or wrong answer depending on whether the arithmetic matches the claimed result.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
László BabaiFor each of up to 100 test cases, decide whether two simple graphs on 3 vertices given by their edge lists are isomorphic.Easy2GraphBrute force+1No attempts yet1s256 MBJudgeable
Anniversary CakeGiven a rectangle and two interior candles, output the specific cut described by a fixed rule that separates the candles.Easy2GeometryImplementation+1No attempts yet2s256 MBJudgeable
Boys and GirlsArrange n children in a circle with B/G so that exactly x stand next to a boy and exactly y next to a girl, output the lexicographically smallest.Easy2ImplementationBrute force+1No attempts yet2s256 MBJudgeable
Data PlanTrack monthly data allowance that rolls over, subtract each month's usage, and report the megabytes available in month N+1.Easy2ImplementationMathNo attempts yet1s64 MBJudgeable
Cleaning StationsGiven weights and a feature matrix, print the indices of the rows whose weighted sum is largest, in ascending order, for each of K data sets.Easy2ImplementationArray+1No attempts yet2s512 MBJudgeable
Walking in timeGiven three credit values, decide whether choosing some of them with signs (+ or -) sums to zero using at least one credit.Easy2Brute forceMath+1No attempts yet1s512 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
Optical mark readingFor each question, read five grey levels; print the single alternative whose value is at most 127, or * if zero or more than one qualify.Easy2ImplementationBrute forceNo attempts yet2s512 MBJudgeable
Alarm ClockFor each case, compute how many minutes pass from the current time until the alarm time, rolling over to the next day when needed.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
Sub-primeGiven each bank's reserve and a list of debentures between banks, check whether every bank ends with a nonnegative balance after all debentures settle at once.Easy2ArrayImplementation+1No attempts yet2s512 MBJudgeable
Dividing NlogôniaGiven a divider point, classify each house coordinate into one of four quadrants or as lying on a dividing line.Easy2ImplementationMathNo attempts yet2s512 MBJudgeable
Pokemon GOFor each species, compute how many net 10-candy evolutions are possible, sum them, and find the species with the most evolutions.Easy2MathImplementationNo attempts yet1s32 MBJudgeable
Second Cheapest PresentGiven a list of distinct prices, print the second cheapest one, formatted with two decimal places.Easy2SortingImplementationNo 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
Olympic GamesFor each year, decide whether it is a summer Olympic year, and if so whether the games were held, cancelled by a war, or not yet assigned a city.Easy2ImplementationMathNo attempts yet2s512 MBJudgeable
VirusGiven a key and one line of ciphertext, undo a Caesar variant whose shift grows by one per letter and resets after 25.Easy2StringSimulation+1No attempts yet2s512 MBJudgeable
Alpha PuzzleAssign numbers 1 to 26 to letters by scanning the grid and numbering each letter at its first appearance.Easy2SimulationString+1No attempts yet2s512 MBJudgeable
Splitting into Two TeamsGiven four sorted skill levels, split them into two pairs of two and print the smallest possible difference between the two pair sums.Easy2Brute forceMath+1No attempts yet2s512 MBJudgeable
Farm robot scarecrowCount how many times a robot moving clockwise or counter-clockwise around N stations visits a given station, starting at station 1.Easy2SimulationImplementationNo attempts yet2s512 MBJudgeable
Unit ConversionGiven x of unit A equals y of unit B, convert each listed amount to the other unit and print the result to six decimals.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
Magic SquaresGiven a 4x4 grid, check whether all four row sums and all four column sums are equal, then print whether it is magic.Easy2ImplementationMatrixNo attempts yet2s512 MBJudgeable
FuelConvert fuel consumption from miles per gallon to liters per 100 kilometers using the given conversion constants.Easy2MathImplementationNo attempts yet1s512 MBJudgeable
Luhn AlgorithmGiven a sixteen-digit card number as a string, check whether it passes the Luhn checksum and print DA or NE.Easy2StringImplementation+2No attempts yet1s512 MBJudgeable
TelephoneFind the base between 2 and 10 whose representation of N has the fewest adjacent digit changes, breaking ties by the largest base.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
Enlarging the Cow SignalPrint an M by N grid of dots and X characters with each cell repeated K times in both directions.Easy2ImplementationArrayNo attempts yet2s512 MBJudgeable
Income taxFor each income, subtract 0, 10 percent, or 20 percent tax depending on whether income is at most 1,000,000, at most 5,000,000, or larger.Easy2ImplementationMathNo attempts yet2s512 MBJudgeable
Key MakerFor each test case, count how many trash keys have the same cut count and can be deepened, or already match, the customer key.Easy2ArrayImplementationNo attempts yet2s512 MBJudgeable
GradesGiven a list of grades, compare the midpoint of the maximum and minimum against the overall average, and report whether they differ by less than 1.Easy2ArrayMath+1No attempts yet2s512 MBJudgeable
Bridge Honor PointsGiven N strings of 13 card characters, add up honor points (A=4, K=3, Q=2, J=1) across all hands and print the total.Easy2ImplementationString+1No attempts yet1s32 MBJudgeable
Sitting (Small)Given a grid of R rows and C columns with R,C at most 5, find the largest set of seats so that no occupied seat has occupied neighbors on both its left and right or both its front and back.Easy2Brute forceImplementationNo attempts yet5s512 MBJudgeable
Country Leader (Small)For each test case, find the name with the most distinct letters, breaking ties by ASCII alphabetical order, and print it.Easy2StringImplementation+2No attempts yet5s512 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
Counting Sheep (Large)For each N, find the first multiple of N that contains all ten digits, or report that no such multiple exists (only N = 0).Easy2MathSimulation+1No attempts yet5s512 MBJudgeable
MicrowaveGiven a start temperature below target, compute total heating time using per-degree rates for frozen and unfrozen states plus a fixed thawing time.Easy2MathImplementation+1No attempts yet2s512 MBJudgeable
Refreshment AreaCount the number of D-long horizontal or vertical runs of empty cells in an N by M grid.Easy2ArrayImplementation+2No attempts yet2s512 MBJudgeable
One Hundred to TenParse a ratio written as n:m, divide both numbers by their greatest common divisor, and print the reduced ratio in the same format.Easy2MathNumber theory+1No attempts yet2s512 MBJudgeable
Base 9Convert a given decimal integer between 1 and 10000 into its base 9 representation.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
Fibonacci-like SequenceGiven n up to 116, compute the n-th term of the recurrence f(n) = f(n-1) + f(n-3) with f(1)=f(2)=f(3)=1.Easy2Dynamic programmingMath+1No attempts yet2s512 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
Birthday GraphRead dates in dd mm yyyy form and print a star per birthday for each of the twelve months, in a numbered case format.Easy2ArrayString+1No attempts yet5s512 MBJudgeable
Grid PatternFor each case, print a text grid with pipe, minus, and plus lines and asterisk-filled cells of size w by h.Easy2ImplementationSimulation+1No attempts yet10s512 MBJudgeable
Speed LimitFor each log entry, multiply the speed by the time since the previous entry, sum these products, and print the total distance in miles.Easy2ImplementationMath+1No attempts yet5s512 MBJudgeable
Outer Triangle SumFor each triangle, add the first and last value of every row plus all values of the last row, counting shared corners once, and print the total.Easy2ImplementationArray+2No attempts yet10s512 MBJudgeable
Linear EquationFor each linear equation ax + b = c, decide whether it has no, one, or infinitely many solutions and print the root truncated to six decimals.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
X X gluedFor each registration number, print every run of two or more identical digits in the four-digit group, in left-to-right order.Easy2StringImplementation+1No attempts yet2s512 MBJudgeable
Card Game ContestFor each of N games, Meiji has A_i decks, or gets one basic deck if A_i is 0. Count the number of distinct ways to enter, modulo M.Easy2MathImplementation+2No attempts yet1s256 MBJudgeable
2017 Yonsei University Programming ContestCount triples (A, B, C) with A+B+C = N, all at least 1, C at least B+2, and A even.Easy2Brute forceMath+1No attempts yet1s128 MBJudgeable
Hongjun surrounded by fansGiven Hongjun's id, print a 3 by 3 grid of emoticons with :id: in the center and :fan: in the other eight cells.Easy2ImplementationStringNo attempts yet1s64 MBJudgeable
We Lost Again TodayGiven the runs each team scored in all nine innings, decide whether the Ullim Geminis ever held a lead during a game they ended up losing.Easy2ImplementationSimulation+1No attempts yet1s64 MBJudgeable
2017 Ajou University Programming Contest (Small)Given up to three contestants' scores, submission counts, and last scoring upload times, output the number of the top-ranked contestant by the tie-break rules.Easy2SortingImplementationNo attempts yet1s512 MBJudgeable
EmpathyMultiply two binary numbers up to 30 bits long and print the product in binary without leading zeros.Easy2MathString+2No attempts yet2s256 MBJudgeable
Jeonbuk National UniversityPrint an ASCII symbol of width N when N is odd, following fixed spacing rules; print "I LOVE CBNU" when N is even.Easy2ImplementationSimulationNo attempts yet1s128 MBJudgeable
Recovering a Damaged ISBN DigitOne digit of a 13-digit ISBN is replaced by '*', and you print the digit that makes the weighted checksum divisible by 10.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
I am happy~Given the height N, width M, and a seat number K in row-major order, print the row and column of that seat.Easy2MathImplementation+2No attempts yet2s256 MBJudgeable
Fox SignGiven up to 10 touching pairs among five fingers, decide whether the pattern matches the fox sign: thumb, middle, and ring all touch, while index and little touch nothing.Easy2ImplementationArrayNo attempts yet0.5s512 MBJudgeable
Who Is the Admin?Given nine clubs with N members each, find the club whose best member solved more problems than the best member of every other club.Easy2ImplementationArray+1No attempts yet1s256 MBJudgeable
Credit Card ValidationFor each 16-digit card number, apply the Luhn checksum (double every second digit from the right, sum digits) and print T if the total is divisible by 10, else F.Easy2ImplementationString+1No attempts yet1s128 MBJudgeable
Paint EstimateFor each floor plan, compute the paintable wall and ceiling area minus window and door areas, multiply by the number of apartments, and round the total up by the coverage of one can.Easy2MathImplementation+2No attempts yet2s512 MBJudgeable
Stacking CupsRead each cup's message, recover its radius from either token order, then print colors from smallest to largest cup.Easy2SortingImplementationNo attempts yet1s512 MBJudgeable
Advertising RevenueFor each data set, sum the payments for every display ad shown and every clickthrough ad clicked, then print the total.Easy2ImplementationSimulationNo attempts yet2s512 MBJudgeable
UphillRead all integers on one line and print Good if they are in non-decreasing order, otherwise Bad.Easy2ArrayImplementationNo attempts yet2s512 MBJudgeable
Term index in an arithmetic sequenceGiven a first term, a common difference, and a value k, print the 1-based position of k in the arithmetic sequence, or X if k is absent.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
Sharing apples and bananasGiven a apples and b bananas, print every common divisor n of a and b with the per-friend apple and banana counts.Easy2MathNumber theory+1No attempts yet2s512 MBJudgeable
Base converterConvert a decimal integer m into base n (2 to 16), using A-F for digits 10 and above.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
Pepero Day 2017Given a time on November 11, 2017, print the Pepero count from the reward rules based on the hour, minute, and second.Easy2ImplementationNo attempts yet2s512 MBJudgeable
Building a distribution tableGiven real numbers in [0,1), count how many fall into each of m equal-length subintervals and print the counts in order.Easy2ImplementationArray+1No attempts yet1s512 MBJudgeable