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
Date Cycle CalculationFind the smallest year whose Earth, Sun, and Moon cycle counters, each resetting at fixed limits, match a given triple of values.Easy3SimulationMath+1No attempts yet2s4 MBJudgeable
Transparent MosaicGiven N rectangular paper sheets on a 100x100 grid, count cells covered by more than M sheets.Easy3ArraySimulation+1No attempts yet2s128 MBJudgeable
Yongsik Goes to CampFor N bus schedules given by first departure, interval, and count, find the minimum wait until Yongsik can board any bus after arriving at time T, or -1 if none is available.Easy3SimulationMath+1No attempts yet2s128 MBJudgeable
Youngsik and Friends' Ball TossSimulate a ball being passed clockwise or counterclockwise by L seats depending on parity of catch count, counting throws until someone catches it M times.Easy3SimulationImplementation+1No attempts yet2s128 MBJudgeable
DNA DecodingRepeatedly merge the last two bases of a DNA string using a fixed lookup table until one base remains, then output it.Easy3SimulationString+1No attempts yet5s16 MBJudgeable
Seongjun and ChocolateGiven chocolate and coffee doses with time-decaying effect radii, sum the positive radii (minimum 1) for each query time.Easy3SimulationBrute force+2No attempts yet1s128 MBJudgeable
Garbage CollectionSimulate a garbage truck visiting points in order, returning to the dump when its load is full or would overflow, and compute the total distance traveled.Easy3SimulationImplementation+2No attempts yet1s128 MBJudgeable
CrosswordGiven a filled crossword grid, extract every maximal horizontal or vertical run of letters of length at least two and output the lexicographically smallest such word.Easy3StringImplementation+1No attempts yet2s128 MBJudgeable
CipherEncrypt a lowercase text by shifting each letter backward in the alphabet by the position value of a repeating key letter, leaving spaces unchanged but still consuming a key character.Easy3StringSimulation+1No attempts yet2s256 MBJudgeable
Woodcut TracesSimulate a tool moving on an N by N grid following U/D/L/R commands, ignoring out-of-bounds moves, and mark each point as unvisited, vertical-only, horizontal-only, or both.Easy3SimulationMatrix+1No attempts yet2s128 MBJudgeable
Multiple of ThreeGiven a huge number as a digit string, repeatedly sum its digits until one digit remains, then report how many steps it took and whether the number is divisible by 3.Easy3StringMath+1No attempts yet2s128 MBJudgeable
Firework ShowGiven N firework periods and an end time C, count how many distinct seconds from 1 to C have at least one firework fired by any student.Easy3ArrayMath+1No attempts yet2s128 MBJudgeable
CipherGiven an encrypted string built by zigzag row reading of a column-filled table, reconstruct the original string for a given number of columns.Easy3SimulationMatrix+2No attempts yet2s128 MBJudgeable
Median FilterApply a 3x3 median filter over an image and count filtered pixels whose median value is at least a given threshold.Easy3MatrixSorting+1No attempts yet2s128 MBJudgeable
Carbon CompoundsParse three molecules of C,H,O atoms and find coefficients 1 to 10 for each side that balance atom counts, lexicographically smallest.Easy3Brute forceString+1No attempts yet2s128 MBJudgeable
Snail 2Simulate a snail-like spiral fill on an M by N grid and count how many times the path turns before every cell is visited.Easy3SimulationMatrix+1No attempts yet2s128 MBJudgeable
Printer QueueSimulate a queue where documents are printed only when no higher-priority document remains, and find the print order of a specific document.Easy3QueueSimulationNo attempts yet2s128 MBJudgeable
MinesweeperGiven an N x N minesweeper grid with mine counts (possibly multi-mine cells), output each empty cell's summed adjacent mine count, capping at 'M' for 10+.Easy3MatrixSimulation+1No attempts yet2s128 MBJudgeable
RoundingGiven an integer up to 99,999,999, repeatedly round its digits at increasing place values (tens, hundreds, etc.) using standard rounding rules and print the final result.Easy3MathImplementation+1No attempts yet2s128 MBJudgeable
Text MessageSimulate typing a message on a numeric keypad, summing key press costs and extra wait times when consecutive characters share a key (except spaces).Easy3SimulationString+1No attempts yet2s128 MBJudgeable
Card 1Simulate a queue where you discard the front card then rotate the next card to the back, printing the discard order and final survivor.Easy3QueueSimulationNo attempts yet2s128 MBJudgeable
Card 2Simulate the Josephus-style card elimination process to find which card number remains last for a given N.Easy3QueueSimulation+1No attempts yet2s128 MBJudgeable
DNA Decoding 2Given a DNA string up to 20 million bases, repeatedly collapse the rightmost two characters using a lookup table until one base remains.Easy3StringSimulation+1No attempts yet1s2 MBJudgeable
LCD Display TestPrint a given number in seven-segment LCD style using dashes and bars, scaled to a given digit size.Easy3SimulationImplementation+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
I Am the Class PresidentCompute total votes for three candidates and pick the winner using tie-break rules on 3-point then 2-point counts, or output 0 if still tied.Easy3SimulationImplementationNo attempts yet1s128 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
Rice Cakes for the TigerGiven the day index D and Fibonacci-like combination coefficients, find starting values A and B (A ≤ B) so the D-th term equals K.Easy3MathBrute force+1No attempts yet1s128 MBJudgeable
Number BaseballGiven N guesses with strike and ball counts in a number-baseball game, count how many three-distinct-digit numbers are consistent with all clues.Easy3Brute forceSimulationNo attempts yet1s128 MBJudgeable
Candy Doctor ChangyoungScan a character grid to count fixed 3-cell horizontal ('>o<') or vertical ('v/o/^') candy patterns.Easy3MatrixImplementation+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
Asian Informatics OlympiadSort students by descending score and pick the top three medalists while capping each country to at most two medals.Easy3SortingGreedy+1No attempts yet1s128 MBJudgeable
Colored PaperGiven up to 100 axis-aligned 10x10 black squares placed on a 100x100 sheet, compute the total area they cover without double-counting overlaps.Easy3ArraySimulation+1No attempts yet1s128 MBJudgeable
BingoSimulate marking a 5x5 bingo board as numbers are called and find the call count when 3 lines (rows, columns, or diagonals) are first completed.Easy3SimulationArray+1No attempts yet1s128 MBJudgeable
Student LineupSimulate inserting students one by one into a line, each moving forward from the end by a given number of positions, then output the final order.Easy3SimulationArrayNo attempts yet1s128 MBJudgeable
Card Game ScoreGiven five playing cards with color and number, compute a poker-like score by checking a fixed priority list of hand patterns.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Receiving a FaxDecode a run-length-encoded byte stream using control bytes that mark literal or repeated runs, then print the result as hex.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Binary ClockConvert a given HH:MM:SS time into two 18-bit binary clock representations, read column-major-mixed 3-column and row-major 3-row layouts.Easy3Bit manipulationImplementation+1No attempts yet1s128 MBJudgeable
DartsFor each test case, sum dartboard scores from coordinates for two players and print the winner or a tie.Easy3GeometrySimulation+1No attempts yet1s128 MBJudgeable
Bicycle SpeedGiven wheel diameter, rotation count, and elapsed time per line, compute total distance in miles and average speed in mph until a zero-rotation terminator.Easy3MathImplementation+1No attempts yet1s128 MBJudgeable
Window BlindsParse a grid of ASCII-drawn window blinds and count how many of the M×N windows show each of five possible blind heights.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Make a CrosswordBuild a grid where word A is placed horizontally and word B vertically, crossing at the first shared letter following a defined scan rule, filling the rest with dots.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Contest or InternshipGiven female and male student counts and a number who must leave for internship, decide who to remove to maximize teams of 2 females and 1 male each.Easy3GreedyMath+1No attempts yet1s128 MBJudgeable
Frog LeapsSimulate a circular arrangement where a proclaimed frog repeatedly swaps forward with its neighbor B times, then output the final order starting from frog 1.Easy3SimulationArrayNo attempts yet1s128 MBJudgeable
KayakParse a grid to find each of nine teams' kayak position, rank teams by distance from the rightmost kayak cell to the finish line with tie handling.Easy3ImplementationSimulation+1No attempts yet1s128 MBJudgeable
Midpoint Displacement AlgorithmGiven N iterations of a midpoint-displacement grid subdivision starting from a square, compute the number of distinct grid points, which reduces to a closed-form formula based on the (2^N+1) x (2^N+1) grid size.Easy3MathSimulationNo attempts yet1s128 MBJudgeable
Machine CodeGiven a sequence of instructions with parameters, compute the minimum NOPs needed so each instruction starts at an address divisible by 4.Easy3GreedySimulation+1No attempts yet1s128 MBJudgeable
Rock-Paper-Scissors ScoreGiven a player's rock-paper-scissors choices against several friends over multiple rounds, compute the actual score and the best possible score with foreknowledge each round.Easy3SimulationGreedy+1No attempts yet1s128 MBJudgeable
Sieve of EratosthenesSimulate the Sieve of Eratosthenes and output which number gets crossed out on the K-th removal step.Easy3SimulationMathNo attempts yet1s128 MBJudgeable
Truck Parking FeesGiven per-truck rates depending on how many of three trucks overlap in time, compute the total parking fee over discrete minute intervals.Easy3SimulationImplementationNo attempts yet1s128 MBJudgeable
Road and Traffic LightsSimulate a truck moving at 1 m/s along a road with traffic lights that cycle red then green, waiting at reds, and output total travel time to the end.Easy3SimulationImplementationNo attempts yet1s128 MBJudgeable
Pascal Loop OutputGiven N up to 1e9, simulate finding the largest divisor of N smaller than N by scanning downward, and output how many steps that takes without brute force.Easy3MathNumber theory+1No attempts yet1s128 MBJudgeable
Aggressive DogsGiven two dogs' attack/rest cycle lengths, determine for three given minute timestamps how many dogs are attacking at that minute.Easy3MathSimulation+1No attempts yet1s128 MBJudgeable
Lexicographically Smallest Crossword WordExtract all horizontal and vertical maximal letter sequences of length at least 2 from a grid and output the lexicographically smallest one.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Lunch WarningsGiven a sequence of children taking food, count how many times a child's total pieces so far exceed all other children's combined total before their next pick.Easy3Hash mapSimulationNo attempts yet1s128 MBJudgeable
Magician Lee MinhyukMirror a given top-left quarter grid horizontally and vertically to build a full card, then flip a single specified cell.Easy3ArrayImplementation+1No attempts yet1s128 MBJudgeable
Marathon Tic-Tac-ToeScan an N by N board to find if any letter forms three consecutive equal marks in a row, column, or diagonal, and print that letter or 'ongoing'.Easy3MatrixSimulation+1No attempts yet1s128 MBJudgeable
Flag RecognitionGiven a 6x9 letter grid, compute the minimum edits needed to make it a valid three-stripe flag, either horizontal (2-row bands) or vertical (3-column bands) with the middle band's color differing from both outer bands.Easy3Brute forceImplementation+1No attempts yet1s128 MBJudgeable
Worm TurnsGiven an M by N grid eaten in a clockwise spiral, compute how many times the direction changes before the whole grid is consumed.Easy3MathSimulationNo attempts yet1s128 MBJudgeable
PizzaGiven each friend's pizza appetite of 1/4, 1/2, or 3/4, compute the minimum number of whole pizzas needed to serve exact slices to all.Easy3GreedyMath+1No attempts yet1s128 MBJudgeable
Phone BillGiven N calls with a start time and duration under 60 minutes, sum the cost by charging 10 won per minute in 07:00-19:00 and 5 won otherwise, splitting calls that cross the boundary.Easy3SimulationImplementationNo attempts yet1s128 MBJudgeable
LukaSimulate a walker's path on a grid and output every time step when the walker is within Chebyshev distance 1 of a fixed point.Easy3SimulationArrayNo attempts yet1s128 MBJudgeable
ComportFind the smallest step size K (1 to N) so repeatedly moving K fields clockwise from field 1 reaches field Z without landing on any obstacle field along the way.Easy3SimulationBrute force+1No attempts yet1s128 MBJudgeable
DollarsSimulate converting between dollars and marks daily using given rates to maximize final dollar amount, truncated to two decimals.Easy3GreedySimulation+1No attempts yet1s128 MBJudgeable
Hotel Room AssignmentSimulate assigning arriving groups to hotel rooms with two beds each, filling empty rooms first then pairing singles, and output the final occupancy per room.Easy3SimulationQueue+1No attempts yet1s128 MBJudgeable
DECODEBuild a substitution cipher table from a key word placed at a given offset, then decode a given ciphertext using it.Easy3StringSimulation+1No attempts yet1s128 MBJudgeable
Hal's CalculatorSimulate a stack-like list of expressions under six commands (HASH, DOLLAR, SWAP, DROP, DUP, ROT), enforcing size and availability constraints, and output the final list or ERROR.Easy3StackSimulation+1No attempts yet1s128 MBJudgeable
N-QueensGiven N, print a specific N-queens placement built by a fixed construction rule based on N mod 6, rather than searching for any valid solution.Easy3MathImplementation+1No attempts yet1s128 MBJudgeable
DartsFor each dart throw coordinate, determine the score based on concentric circle radius bands and sum the scores per test case.Easy3MathImplementation+1No attempts yet1s256 MBJudgeable
GameGiven many filled 5x5 tic-tac-toe boards, determine for each whether A, B, or neither has three consecutive same marbles in a row, column, or diagonal.Easy3MatrixSimulation+1No attempts yet1s128 MBJudgeable
Reaux! Sham! Beaux!Parse rock-paper-scissors rounds given in multiple languages per player, tally wins, and print each game's score and winner.Easy3StringHash map+1No attempts yet1s128 MBJudgeable
Easy TaskProcess a list of contest submissions to compute, for each of nine problems, the number of teams that solved it and the average submissions and solve time.Easy3Hash mapSimulation+1No attempts yet1s128 MBJudgeable
GatesGiven an acyclic NAND-gate circuit whose inputs are all tied to one variable x, decide whether the overall output depends on x (answer 1) or is constant (answer 0).Easy3SimulationGraph+1No attempts yet1s128 MBJudgeable
HotlineAnswer yes, no, or maybe questions about one-word subjects and verb-object activities using the statements heard earlier in each dialogue.Easy3Hash mapSimulation+1No attempts yet1s128 MBJudgeable
Building for the UNPrint a fixed two-floor n by n grid where the lower floor's rows and upper floor's columns each represent a labeled country, satisfying a connectivity and adjacency construction.Easy3ImplementationSimulation+1No attempts yet3s128 MBJudgeable
Water Main BreakGiven several water main breaks with start, end, and flow rate, sum the gallons leaked during each second of a given query interval.Easy3ArraySimulation+1No attempts yet1s128 MBJudgeable
Roots IntervalsGiven interval [a,b] split into nb equal subintervals, count subintervals where f(x)=1-x^2 has a sign change or zero at endpoints.Easy3ImplementationSimulation+1No attempts yet1s128 MBJudgeable
Count on CantorFor given indices n, find the n-th fraction a/b in Cantor's diagonal enumeration of positive rationals and print it in a fixed format.Easy3MathImplementation+1No attempts yet1s128 MBJudgeable
Mowing the LawnDetermine if sorted mower path coordinates with a given strip width fully cover a 75x100 rectangle in both directions, across multiple test cases until a terminator line.Easy3SortingSimulation+1No attempts yet1s128 MBJudgeable
Working at the RestaurantSimulate a two-pile plate stacking strategy that always drops on pile 2 and serves from pile 1, moving plates when pile 1 runs out, and output the exact operation transcript.Easy3StackSimulation+1No attempts yet1s128 MBJudgeable
Gray AreaCompute weighted ink used by a histogram where each bar contributes its normalized height times a linearly decreasing darkness, plus a fixed constant.Easy3ArraySimulation+1No attempts yet1s128 MBJudgeable
And Then There Was OneSimulate a Josephus-style circle elimination game with a custom starting removal point and report the last remaining stone for each test case.Easy3SimulationQueue+1No attempts yet1s128 MBJudgeable
Unreliable MessengersGiven a sequence of reversible string transformations and the final message, undo each transformation in reverse order to recover the original message.Easy3StringSimulation+1No attempts yet1s128 MBJudgeable
Hailstone SequenceFor each of up to 100,000 starting values, simulate the Collatz sequence until it reaches 1 and report the maximum value seen.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Roll CakeGiven N interval requests over pieces 1..L, find the member with the largest requested length, then the member who actually receives the most pieces when earlier requests get priority.Easy3SimulationArray+1No attempts yet1s128 MBJudgeable
Chain of FoolsGiven sprocket prongs, chain links, and start positions of a broken prong and bent link, find when they first meet at location 0, printing revolutions and fraction or Never.Easy3MathNumber theory+2No attempts yet1s128 MBJudgeable
WindowsGiven windows in opening order, answer clicks by returning the most recently opened window covering each click point, or background if none does.Easy3ArrayBrute force+2No attempts yet1s128 MBJudgeable
LCRSimulate the dice game LCR turn by turn with the given rolls, then print the final chip counts for each player and the center.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Snakes and LaddersSimulate a Snakes and Ladders game with a players and a list of die rolls, applying snakes and ladders after each move, and print each token's final square.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
To and FroDecode a message written row by row in alternating left-to-right and right-to-left order back into column-major plaintext.Easy3StringSimulation+2No attempts yet1s128 MBJudgeable
Ferry Loading IVSimulate a ferry of given length that repeatedly crosses between two banks, loading waiting cars in arrival order.Easy3SimulationQueueNo attempts yet1s128 MBJudgeable
Word RatiosFor each line of three equal-length lowercase words, apply the per-letter alphabet shift from the first word to the second onto the third, and output all four words.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
Traditional BINGOFor each card, find how many announced numbers are needed before some row, column, or diagonal of five spaces is fully marked, with the center free.Easy3SimulationArray+2No attempts yet1s128 MBJudgeable
Stack 'em UpApply a sequence of fixed 52-card permutation shuffles to a new deck, printing the deck after each shuffle.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Average SpeedTrack a car's speed changes over time and answer queries asking the total distance travelled up to a given elapsed time.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Carry CountFor each pair of non-negative integers, count how many carries occur while adding them column by column from the right. Stop at the 0 0 line.Easy3ImplementationMath+1No attempts yet1s128 MBJudgeable
MinesweeperGiven an n×n mine layout and which cells are currently opened, print the board: mine counts for opened safe cells, asterisks for all mines if any mine was opened, and dots elsewhere.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
The Elf's SwordFor each input n, find the smallest k such that the digits 0 through 9 all appear across the multiples n, 2n, ..., kn.Easy3ImplementationSimulation+2No attempts yet1s128 MBJudgeable
ROT13Decode lines of text by reversing the ROT13 cipher: each vowel shifts three places back in a fixed vowel order, each consonant ten back in a consonant order.Easy3ImplementationString+2No attempts yet1s128 MBJudgeable
Tales from DeCryptRead three LCG parameters, then walk the ciphertext byte by byte, advancing the generator only on printable ASCII, and apply the inverse rotation to each such byte.Easy3SimulationMath+2No attempts yet1s128 MBJudgeable