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 results2,994 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
Shuttle RunGiven the total distance Jihun can run, report which of the 5 m cone intervals he collapses in.Easy3MathImplementation+1No attempts yet1s128 MBJudgeable
Look for the Winner!Given votes counted in order, report the earliest prefix after which one candidate's lead cannot be overtaken from remaining votes, or TIE.Easy3ArraySimulation+1No attempts yet2s512 MBJudgeable
TrucksTrucks cross a one-lane bridge in order under a weight limit; find the earliest time all have finished.Easy3QueueSimulationNo attempts yet1s512 MBJudgeable
Quality of Check DigitsGiven a 10x10 operation table, count how many of the 10000 four-digit basic IDs let a single-digit change or an adjacent swap pass the check digit test.Easy3ImplementationBrute force+1No attempts yet1s512 MBJudgeable
Course registrationGiven a click log of student numbers and K seats, keep each student's last click, then print the first K distinct students in that order.Easy3QueueHash map+1No attempts yet1s256 MBJudgeable
Turing machine halting in ten stepsSimulate a Turing machine for at most 10 steps on each query tape and report whether it reaches the halting state.Easy3SimulationImplementation+2No attempts yet1s256 MBJudgeable
RobotFollow TURN and MOVE commands from the origin facing east, print the final coordinates, or -1 if any move leaves the square.Easy3SimulationImplementation+1No attempts yet1s512 MBJudgeable
Strategy GameDistribute J times R point values to players in turn order, sum each player's points, and find the highest scorer, breaking ties by last move.Easy3ArraySimulationNo attempts yet1s512 MBJudgeable
The Lap Where the Backmarker Falls BehindGiven lap times X (fast) and Y (slow), find the leader's lap number when the leader first laps the slowest driver.Easy3MathSimulationNo attempts yet2s512 MBJudgeable
Digital Biochemical CircuitGiven an N-by-P table of bits, count the runs of consecutive 1s in each column whose length is at least C.Easy3MatrixSimulation+1No attempts yet1s512 MBJudgeable
Collector RobotSimulate a robot moving on a grid with pillars, turning and stepping according to a given instruction string, and count the distinct stickers it visits.Easy3SimulationImplementationNo attempts yet2s512 MBJudgeable
Peaks of a Musical LoopCount local maxima and minima in a circular sequence of samples where consecutive values differ and the first and last differ.Easy3ImplementationArray+1No attempts yet2s512 MBJudgeable
Hawk EyesGiven a sequence of cup swaps among four positions, track where the small ball (initially at position 1) and big ball (initially at position 4) end up.Easy3SimulationImplementationNo attempts yet1s512 MBJudgeable
Averages in PlaceGiven N, print the one fixed N x N table whose row and column averages each land inside their own row and column, with -1 for N=2.Easy3ImplementationMath+2No attempts yet1s64 MBJudgeable
The Calculus of AdaGiven n values of a polynomial at evenly spaced inputs, find the degree of the minimal-degree polynomial and its value at the next input using finite differences.Easy3MathImplementation+2No attempts yet2s512 MBJudgeable
Hunt the RabbitFor each hidden rabbit position, print the sequence of envelope numbers a lower-middle binary search opens until it finds the rabbit.Easy3Binary searchSimulationNo attempts yet2s512 MBJudgeable
Hyper Rock-Scissors-PaperGiven each player's gesture in a 15-gesture rock-paper-scissors variant, find the single gesture that beats at least one shown gesture and loses to none, or report Draw.Easy3ImplementationArray+2No attempts yet8s512 MBJudgeable
Blackjack DealerSimulate the dealer's blackjack hand: report blackjack, bust, or the final score after the dealer plays by fixed rules.Easy3SimulationImplementationNo attempts yet8s512 MBJudgeable
ImenaSplit a book's text into N sentences and count, for each, how many words are names (uppercase first letter, lowercase rest).Easy3StringImplementation+1No attempts yet1s32 MBJudgeable
Dudu of EnglishApply seven ordered text transformations (lowercase, of-word replacement, vowel deletion, punctuation removal, line join, space condense, 20-char reflow) to translate English into Dudu's dialect.Easy3StringImplementation+1No attempts yet2s512 MBJudgeable
ReversalApply M substring reversals to a string of up to 2.5 million characters and print the final result.Easy3StringImplementation+1No attempts yet1s256 MBJudgeable
TriangleRecursively subdivide a triangle into three corner triangles N-1 times and print the resulting ASCII fractal.Easy3Divide and conquerRecursion+1No attempts yet1s64 MBJudgeable
The Crow's Last AttackSimulate a crow that attacks around a circular line of enemies, reversing on kills, and report which enemy takes the last attack.Easy3SimulationImplementationNo attempts yet2s512 MBJudgeable
Ticket machine keyboardGiven destination names and a pressed prefix, mark on a 4x8 grid every letter that can immediately follow the prefix in some name.Easy3StringSimulation+2No attempts yet1s32 MBJudgeable
Counting Sheep (Small)Track which digits 0 to 9 appear as Bleatrix counts multiples of N, and report the last multiple or INSOMNIA if digit 9 never completes.Easy3SimulationImplementation+1No attempts yet5s512 MBJudgeable
Baskin-Robbins 31Given n games with parameters j and m, compute how many turns each lasts and report the earliest game with the minimum turn count.Easy3MathImplementation+2No attempts yet2s256 MBJudgeable
Hoof, Paper, Scissors (Bronze)Given a sequence of pairs of gesture numbers, try all six ways to map numbers 1,2,3 to hoof, paper, scissors and report the largest number of games the first cow wins under any mapping.Easy3Brute forceSimulation+1No attempts yet2s512 MBJudgeable
Why Did the Cow Cross the Road 1Given observations of which side of the road each of 10 cows stands on, count how many times a cow changes sides between consecutive observations of that cow.Easy3ArrayImplementation+2No attempts yet2s512 MBJudgeable
Why Did the Cow Cross the Road 3Given each cow's arrival and inspection time, find the earliest time all cows finish entering when inspected one at a time in arrival order.Easy3SortingSimulationNo attempts yet2s512 MBJudgeable
The Lost CowGiven start x and target y on a number line, simulate a doubling zig-zag search and report the total distance traveled until y is reached.Easy3MathSimulationNo attempts yet2s512 MBJudgeable
Kim's DinerMaintain a list of pending orders under append, sort by (time, table), and delete-by-table commands, printing the list after each query.Easy3SimulationSorting+2No attempts yet2s256 MBJudgeable
High-End ArtworkStamps are pressed onto a paper in a given order; later presses overwrite earlier ones. Print the final grid, using '.' for untouched cells.Easy3SimulationArray+1No attempts yet4s512 MBJudgeable
Mun, Hong, AnEach secretary adds one step to every stone in one direction from the start. Count total steps per stone modulo 3, then split P by the final blue, red, and green counts.Easy3ImplementationPrefix sum+2No attempts yet2s256 MBJudgeable
Sickly YeongjeongMap each symptom to its medicine name, then for every query list output the matching medicines in order or YOU DIED if any symptom is untreatable.Easy3Hash mapImplementation+2No attempts yet1s512 MBJudgeable
Ttakji GameFor each of N rounds, compare two cards by counting stars, then circles, then squares, then triangles, and print which player wins or a draw.Easy3ImplementationArray+1No attempts yet2s512 MBJudgeable
Coke Drinking ContestGiven N entrants who each drink A mL per second with fixed drinking and resting periods, find when the first entrant finishes K mL.Easy3MathSimulation+1No attempts yet1s512 MBJudgeable
Reverse NonogramGiven a solved nonogram grid of '.' and 'X', print the run-length clues for every row and then every column.Easy3ImplementationSimulation+2No attempts yet2s512 MBJudgeable
Tracking Fake NewsModel a story spreading through a social network where each person reposts only if a weighted sum of the story's categories equals their target.Easy3GraphBFS+1No attempts yet2s512 MBJudgeable
Alphabet Cake (Large)Fill every blank cell in a grid so each distinct letter occupies one axis-aligned rectangle, following the prescribed row-by-row expansion rule.Easy3ImplementationSimulation+1No attempts yet5s512 MBJudgeable
Happy NumberDecide whether repeatedly summing the squares of a number's decimal digits ever reaches 1.Easy3SimulationHash map+1No attempts yet0.2s512 MBJudgeable
Cezar's BlackjackGiven the values of N drawn cards summing to at most 21, decide whether to draw again based on how many remaining cards exceed the gap to 21.Easy3ImplementationMath+2No attempts yet1s64 MBJudgeable
Is Everybody Appy?Given each kid's ranked list of apps from oldest to youngest, assign each kid the highest-ranked app not already taken by an older kid.Easy3Hash mapGreedy+2No attempts yet2s512 MBJudgeable
DRM MessagesSplit a string in half, rotate each half by its character sum, then merge the halves by rotating one half with the other's values.Easy3StringImplementation+2No attempts yet2s512 MBJudgeable
Game of ThrownsTrack a token around a circle of children through clockwise or counterclockwise throws, undoing the last m throws on command.Easy3StackSimulation+1No attempts yet2s512 MBJudgeable
Lights in the MorningGiven each light's first green time and green/red cycle, decide whether a car driving 1 km per minute reaches every light during green.Easy3ImplementationMath+1No attempts yet2s512 MBJudgeable
Golf CroquetSimulate a golf croquet doubles game from a stroke record and report the score and standing once a team reaches 7 points.Easy3SimulationImplementation+1No attempts yet2s512 MBJudgeable
FitnessSimulate moves around 8 circularly numbered stations and print the visited sequence, marking it reject if fewer than 5 distinct stations appear or any station repeats.Easy3SimulationImplementation+2No attempts yet2s512 MBJudgeable
Musical ChairsSimulate musical chairs: each round every remaining player shifts M seats clockwise, the player at seat S is eliminated, and seats are renumbered until R rounds pass.Easy3SimulationImplementation+2No attempts yet2s512 MBJudgeable
League TablesGiven each team's current record and a list of match results, update the records and print the table sorted by points, goal difference, goals scored, then name.Easy3ImplementationSorting+2No attempts yet2s512 MBJudgeable
Another Brick in the WallSimulate laying bricks in pile order across h layers of width w, and report whether every layer fills exactly before the pile runs out.Easy3SimulationImplementation+2No attempts yet2s512 MBJudgeable
Name CompatibilityInterleave two equal-length names letter by letter, replace each letter with its stroke count, then repeatedly sum adjacent digits (keeping the ones digit) until two remain.Easy3ImplementationSimulation+2No attempts yet1s512 MBJudgeable
Bank Card VerifierEach test case gives a 16-digit card number as four 4-digit groups; apply the Luhn checksum rule and print Yes if the total is a multiple of 10, otherwise No.Easy3ImplementationString+2No attempts yet2s512 MBJudgeable
Aron's Place in LineGiven the shirt colors of people in line, where each maximal run of equal colors is one group, find the position Aron occupies at the back.Easy3ImplementationString+2No attempts yet1s32 MBJudgeable
Vera and ABCDEGiven a string of N letters from A to E, render the 5x3 pattern for each letter side by side and print the resulting 5 rows of 3N characters.Easy3ImplementationString+2No attempts yet2s512 MBJudgeable
Poker Card CombinationsGiven six card ranks, count how often each rank appears and print which of the nine named poker combinations the hand forms.Easy3Hash mapImplementation+1No attempts yet1s512 MBJudgeable
Äventyr 1On a path 1 to N, vertices become active over time; after each activation, answer the distance from a query vertex to the nearest active vertex, or -1 if none exists yet.Easy3ArraySorting+2No attempts yet1s256 MBJudgeable
Accepted ratioGiven a submission log, ignore the administrator, count solvers and the rejections each made before their first accepted submission, then print the accepted ratio with 10 decimals.Easy3ImplementationHash map+2No attempts yet2s512 MBJudgeable
BeondegiGiven A players in a circle and a chant pattern by rounds, find who makes the T-th call of a chosen word (ppeon or degi), counting only that word.Easy3MathImplementation+2No attempts yet1s128 MBJudgeable
Round and Round SnailA snail walks a clockwise square spiral from the origin, one cell per second; given n seconds, print its coordinates.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
A/B to 2000 decimal placesPrint A/B with exactly 2000 digits after the decimal point, truncating rather than rounding.Easy3MathImplementation+1No attempts yet0.5s512 MBJudgeable
RouterSimulate a buffer of size N: packets arrive in order, 0 means one is handled and removed from the front, and a packet arriving with the buffer full is dropped.Easy3QueueSimulation+2No attempts yet1s512 MBJudgeable
Stroop EffectGiven sequences of two-digit word-ink codes, check whether each sequence satisfies the counts and the no-three-in-a-row rule for a valid Stroop test.Easy3ImplementationSimulation+2No attempts yet2s512 MBJudgeable
Baby Sukhwan Tururu TuruFind the N-th word of a repeating song whose tururu runs grow by one extra ru each repetition, with long runs printed in a compressed form.Easy3ImplementationMath+2No attempts yet1s512 MBJudgeable
Binary Search TreeInsert a sequence of integers into a BST and output the depth of each inserted node.Easy3TreeRecursion+1No attempts yet2s512 MBJudgeable
Lie DetectorEach detector vouches for the previous one except the last, which is always right. Walk the chain backwards and flip the answer once per LIE report.Easy3ImplementationSimulationNo attempts yet1s512 MBJudgeable
ICPCGiven the four goal counts from two-legged finals, apply aggregate scores and the away goals tiebreak to name the winner or output Penalty.Easy3ImplementationMath+1No attempts yet2s512 MBJudgeable
TurnaroundsGiven the seconds when each team scored, report how many points fell in the first half and how many times the lead changed from strictly behind to strictly ahead.Easy3ImplementationSimulation+2No attempts yet1s512 MBJudgeable
Sugoroku and PiecesMove pieces forward one square on a 2019-square board, but block moves onto the goal or an occupied square, then report each piece's final position.Easy3SimulationArray+1No attempts yet2s512 MBJudgeable
Slimming PlanSimulate daily weight changes from the repeating D-day plan and report the day the weight reaches T, or output -1 if it never does.Easy3SimulationArray+1No attempts yet2s512 MBJudgeable
Cellphone Text CompressionFor each of N strings, output its run-length encoding: each maximal run of identical characters as a count followed by the character.Easy3StringImplementation+1No attempts yet1s512 MBJudgeable
FlipperStart with the grid 1 2 / 3 4 and apply a sequence of horizontal (H) and vertical (V) flips, then print the final grid.Easy3SimulationImplementation+1No attempts yet1s512 MBJudgeable
Shell GameGiven N shell swaps and Elsie's guess after each swap, find the highest number of correct guesses she could make over all possible starting positions of the pebble.Easy3SimulationBrute force+2No attempts yet2s512 MBJudgeable
Word ClockConvert an hour and minute into the words a word clock shows, using past or to and special phrases for 0, 15, 30, and 45 minutes.Easy3ImplementationString+2No attempts yet0.5s512 MBJudgeable
3-Minute GraphSubmit source code to a microwave judge: a program that fails to compile resets the timer with a fresh graph, a compiling one serves it, so the program must compile after roughly three minutes of runtime.Easy3ImplementationSimulationNo attempts yet1s512 MBJudgeable
Total Number of CountsGiven N bills and bundle size M, repeatedly count items and group them into bundles of M until no bundle can form, then print the total number of counts.Easy3MathSimulation+2No attempts yet1s512 MBJudgeable
Phone Number CompatibilityInterleave two 8-digit phone numbers, repeatedly replace adjacent pairs by the units digit of their sum until two digits remain, and print the score with leading zeros.Easy3ImplementationSimulation+1No attempts yet2s256 MBJudgeable
Good Day Bad DayGiven a two-state Markov chain's transition probabilities and a starting mood, compute the probability of each mood N days later and print each scaled by 1000.Easy3ProbabilityDynamic programming+2No attempts yet1s256 MBJudgeable
I AM IRONMANSimulate N games: look up each opponent in a win/loss table, add W or subtract L (floored at 0), and report whether the score ever reaches G.Easy3SimulationImplementation+2No attempts yet1s256 MBJudgeable
I am GrootGiven trunk length L and ratio R, branches double each level while length becomes floor(prev*R/100), stopping when a level's length is 5 or less; sum all branch lengths.Easy3SimulationImplementation+1No attempts yet1s256 MBJudgeable
Only Three!Count how many length-3 windows of a digit string are strictly increasing and are not extended to a run of four or more consecutive digits.Easy3StringImplementation+2No attempts yet1s256 MBJudgeable
Worm ReproductionTrack a worm population over N years where each worm splits yearly and dies after 3 or 4 splits depending on its birth year's parity.Easy3SimulationImplementationNo attempts yet1s256 MBJudgeable
What Does Milk Say When It Falls Over?Given a grid of ASCII art characters, rotate it 90 degrees to the left, mapping each character to its rotated counterpart.Easy3ImplementationMatrix+2No attempts yet1s1024 MBJudgeable
Star FruitGiven summer length N, growth time T, C plots, and price P, compute the maximum money earnable by planting and replanting each plot as often as possible.Easy3GreedyMath+2No attempts yet1s256 MBJudgeable
GerrymanderingSum precinct votes into districts, find each district's winner, compute lost and excess wasted votes per party, then output the overall efficiency gap.Easy3ImplementationMath+2No attempts yet2s1024 MBJudgeable
Beer BillParse each bill line as either an item price with optional bars or a bars-only rake line, then print the total (beer at 42) rounded up to a multiple of 10 in the N,- format.Easy3ImplementationString+2No attempts yet2s512 MBJudgeable
ClockGiven a clock time, compute the angles each hand makes with 12 o'clock and report the smallest of the three pairwise angles.Easy3MathGeometry+2No attempts yet1s512 MBJudgeable
Joint AttackConvert a continued fraction given as coefficients into a single reduced fraction, with numerator and denominator under 10^18.Easy3MathImplementation+2No attempts yet1s512 MBJudgeable
Pongdang Pongdang 2Decide whether Hwisu raises an arm on turn T of a circular drinking game where the number of arms per turn cycles up and down between 1 and 2N.Easy3MathImplementation+1No attempts yet1s256 MBJudgeable
Pongdang Pongdang 1Given N players and a turn T, find how many arms must be raised on turn T as the count cycles 1,2,...,2N,2N-1,...,1 repeatedly.Easy3MathImplementation+1No attempts yet1s256 MBJudgeable
CheckerboardGiven row heights and column widths that partition a grid into a v by h block matrix, color each block so side-adjacent blocks differ, starting Black at the top left.Easy3ImplementationSimulation+1No attempts yet1s512 MBJudgeable
NBA DraftClassify each player into one of four draft categories by comparing five integer statistics against expected ranges and their midpoints.Easy3ImplementationMath+2No attempts yet2s512 MBJudgeable
Cat FoodGiven a binary picture rotated 90 degrees counterclockwise, check whether it equals the students' picture under the reverse rotation.Easy3ImplementationMatrix+2No attempts yet1s1024 MBJudgeable
Strange Cipher CodeSplit a string into case-insensitive runs of equal letters, map each run to 1 if its length is at least K and 0 otherwise, and drop later runs whose letter already appeared.Easy3StringImplementation+2No attempts yet1s1024 MBJudgeable
Black and WhiteGiven an n by n grid of B and W cells, check that every row and column is balanced and has no three cells of the same color in a row.Easy3ArrayImplementation+2No attempts yet1s512 MBJudgeable
Basketball One-on-OneGiven a string recording who scored and how many points each time, determine which player won the basketball game under the eleven-point and win-by-two rules.Easy3ImplementationSimulation+2No attempts yet1s512 MBJudgeable
Soft PasswordsGiven a stored password S and an entered password P, decide whether P is accepted: equal to S, a digit-prepend/append of S, or the case-reversed form of S.Easy3StringImplementation+2No attempts yet1s512 MBJudgeable
ZOAC 2A disk holds the 26 uppercase letters in a circle, and an arrow starts at 'A'. Find the minimum total rotations needed to print a given string in order.Easy3ImplementationGreedy+2No attempts yet1s512 MBJudgeable
Square Eye TestIn a grid containing exactly one colored square border with a one-cell gap at the middle of a side, report which side has the gap.Easy3ImplementationArray+2No attempts yet1s512 MBJudgeable
Queue 2Implement a queue supporting push, pop, size, empty, front, and back, and run N commands, printing output for the query commands.Easy3QueueImplementation+2No attempts yet1s512 MBJudgeable
Boxing Day Football AnalysisGiven the order of N goals scored by two teams, report the final score, the number of tied scores reached during the match, and the longest run of successive goals that flipped a deficit into a lead.Easy3SimulationImplementation+2No attempts yet1s512 MBJudgeable