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,798 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
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
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
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
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
UphillRead all integers on one line and print Good if they are in non-decreasing order, otherwise Bad.Easy2ArrayImplementationNo 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
Qualifiers for the Next PhaseGiven N scores and a minimum cutoff rank K, count how many competitors advance when ties at the K-th score also qualify.Easy2SortingArray+1No attempts yet1s1024 MBJudgeable
Batter UpRead n at-bat outcomes, sum the bases from official at-bats (0 to 4), divide by how many of them are not walks, and print the result to six decimals.Easy2ImplementationMath+2No attempts yet2s512 MBJudgeable
Latin SquaresRead an n by n grid of base-n digit characters and report whether it is a Latin square, and if so whether it is in reduced form.Easy2ImplementationArray+2No attempts yet1s512 MBJudgeable
Grass CuttingAfter each week every cell grows 1 cm, then cells in the chosen rows and columns are reset to 1 cm; report the final heights of the 10x10 grid.Easy2SimulationImplementation+1No attempts yet1s512 MBJudgeable
Recently Used DocumentsSimulate a most-recently-used list of capacity k: each opened document moves to the front, new ones are inserted there and the back is dropped when full, then print the final list.Easy2SimulationImplementation+2No attempts yet1s512 MBJudgeable
Opening CeremonyFor each data set, count how many athletes from each country marched, then report the largest shortfall against that country's registered total.Easy2ArrayImplementation+1No attempts yet2s512 MBJudgeable
Triple JumpFind the first step in [30.0, 30.2], then report 30.0 minus the smallest position among steps at least 3 later, or 0 if none exists.Easy2ImplementationArrayNo attempts yet2s512 MBJudgeable
Shattered CakeGiven the cake's width and the dimensions of all shattered rectangular pieces, sum the piece areas and divide by the width to get the length.Easy2MathImplementation+2No attempts yet10s512 MBJudgeable
Array Manipulation at Moloco (Easy)For each element, count how many earlier elements in the array are smaller, and print those counts one per line.Easy2ArrayBrute forceNo attempts yet2s512 MBJudgeable
Lorem ipsumSplit a fixed Latin placeholder paragraph into words and print the words at indices L through R separated by spaces.Easy2StringImplementation+1No attempts yet0.1s512 MBJudgeable
Lotto number frequencyGiven a number n from 1 to 45, print how often n appears among the six main winning numbers of 700 fixed Nanum Lotto rounds. The counts are precomputed constants.Easy2ImplementationArrayNo attempts yet1s256 MBJudgeable
Midterm Exam GradingGiven point values for N problems and each examinee's O/X results, find the highest scorer, breaking ties by the smallest exam number.Easy2ImplementationArray+1No attempts yet1s512 MBJudgeable
Magic SquareGiven an N by N matrix, decide whether its entries form a magic square with equal row, column, and diagonal sums.Easy2ImplementationMatrix+1No attempts yet1s512 MBJudgeable
Jealous JinseoCheck whether any person in Jinseo's row or column has higher charm than him, printing ANGRY if so and HAPPY otherwise.Easy2ImplementationArrayNo attempts yet1s512 MBJudgeable
It Worked, So Why Is It Wrong?Compare the expected answer with Manyoung's output for each sample and system test case, then print Accepted, Wrong Answer, or Why Wrong!!! according to which group fails.Easy2ImplementationSimulation+2No attempts yet1s512 MBJudgeable
Suchan Is a Marine Boy!!Given N practice records, compute the ratio of their arithmetic mean to the expected value of a value drawn uniformly from them, or print divide by zero.Easy2MathImplementation+2No attempts yet2s512 MBJudgeable
Prize HunterGiven two ranks a and b from two contests, print the total prize money using each contest's published prize table.Easy2ImplementationArrayNo attempts yet1s512 MBJudgeable
HappinessRead N scores and print the difference between the maximum and minimum score.Easy2ArrayImplementationNo attempts yet2s512 MBJudgeable
Are we there yet?Given four distances between consecutive cities on a line, print the full 5x5 table of distances between every pair of cities.Easy2ArrayPrefix sum+2No attempts yet2s512 MBJudgeable
Income InequalityFor each dataset, count how many incomes are less than or equal to the average income.Easy2ArrayImplementation+1No attempts yet2s512 MBJudgeable
SculptureGiven a grid of distinct neighboring heights, mark each interior cell with 1 if all four adjacent cells are higher, otherwise 0.Easy2ArrayImplementation+1No attempts yet2s512 MBJudgeable
Setting a Time LimitGiven n runtimes in milliseconds and a factor s, output the smallest whole number of seconds that is at least s times the largest runtime.Easy2MathImplementation+1No attempts yet2s512 MBJudgeable
Tour de BINUSSum students over Ayu's left or right walk from x1 and count zero-valued rooms over Budi's walk from x2.Easy2ArrayPrefix sum+1No attempts yet1s512 MBJudgeable
ASCII ArtRead an N by M grid of RGB triples, apply the given intensity formula, map each value to a character via the threshold table, and print the grid.Easy2ImplementationMath+1No attempts yet1s512 MBJudgeable
ChessGiven one square in letter-number notation and another in a 1-to-64 numbering, decide whether the two squares share the same color on a chessboard.Easy2ImplementationMath+2No attempts yet2s512 MBJudgeable
Why Cherry Blossoms Bloomed on Info IslandSplit a sequence of N numbers into four consecutive nonempty groups, maximizing the sum of the four group products.Easy2Brute forceImplementation+1No attempts yet2s256 MBJudgeable
∑|ΔEasyMAX|Given a sequence of tempos, answer queries that ask for the sum of absolute differences between consecutive values over a range.Easy2Prefix sumArray+2No attempts yet1s256 MBJudgeable
Taxicab DistanceGiven an N by M grid of 0s and 1s with exactly two 1s, print the Manhattan distance between them.Easy2ArrayImplementation+2No attempts yet1s256 MBJudgeable
Wagle Wagle SoongkohanGiven three distinct participation values, print OK if their sum is 100 or more, otherwise print Soongsil, Korea, or Hanyang for the smallest.Easy2ImplementationArray+2No attempts yet1s512 MBJudgeable
BuffoonGiven N vote counts in registration order, output S if the first candidate has the unique most votes, otherwise N.Easy2ImplementationArray+1No attempts yet1s512 MBJudgeable
Scores of Final ExaminationGiven m subjects and n students, with each subject's scores listed in a row, find the maximum total score across students.Easy2ArrayImplementation+1No attempts yet2s512 MBJudgeable
Missing NumbersGiven an increasing list of distinct numbers a child recited, print every integer from 1 up to the last recited number that is missing, or print "good job" if none are.Easy2ArrayImplementation+2No attempts yet1s1024 MBJudgeable
Mangling NamesGiven a table of pronunciation times by vowel and consonant counts, sum the times for each student name and report the total.Easy2ImplementationString+2No attempts yet2s512 MBJudgeable
What Is My Grade?Given 50 distinct scores sorted in descending order and Hongik's score, print the letter grade matching his rank using the fixed cutoffs.Easy2ArrayImplementation+2No attempts yet1s256 MBJudgeable
This Problem’s a Slam DunkGiven the heights of five players on each of two teams, count how many State U players are taller than the opponent they guard after sorting both teams by height.Easy2SortingArray+1No attempts yet1s512 MBJudgeable
License to LaunchFind the earliest index of the minimum value in an array of n space-junk counts and print the zero-based day.Easy2ArrayImplementation+1No attempts yet1s512 MBJudgeable
Hot HikePick a start day for a 3-day trip so the maximum temperature on the first and third days is as low as possible, breaking ties by smallest start day.Easy2Brute forceArray+1No attempts yet2s512 MBJudgeable
I'll Pay, No I'll PayPeople take turns adding to their outstretched amount; find who first reaches the threshold K and on which of their turns.Easy2SimulationImplementation+1No attempts yet2s512 MBJudgeable
KBLTRNSGiven several routes, each with a time and a price, print the smallest time among the routes that reach the destination within the 12 hour limit.Easy2ImplementationArray+1No attempts yet2s512 MBJudgeable
Lucky StraightGiven an even-length number, decide whether the sum of its left-half digits equals the sum of its right-half digits, printing LUCKY or READY.Easy2StringImplementation+2No attempts yet1s256 MBJudgeable
MergeMerge two sorted sequences into one sorted sequence using the given tie-breaking rule, which takes from A when the front elements are equal.Easy2Two pointersImplementation+2No attempts yet2s512 MBJudgeable
Longest Ascending Contiguous SubsequenceGiven a sequence of positive integers, find the length of the longest contiguous run whose elements are non-decreasing.Easy2ArrayImplementation+1No attempts yet2s512 MBJudgeable
ArtGiven N paint drop coordinates, find the smallest axis-aligned rectangle that strictly contains every point, and print its bottom-left and top-right corners.Easy2ImplementationMath+2No attempts yet2s512 MBJudgeable
The Pleasant WalkGiven a sequence of house colors, find the length of the longest contiguous segment in which no two adjacent houses share the same color.Easy2ArrayImplementationNo attempts yet1s512 MBJudgeable
TreasureGiven two arrays A and B, rearrange A (B stays fixed) to minimize the sum of elementwise products, using the sorted pairing strategy.Easy3GreedySorting+1No attempts yet2s128 MBJudgeable
Number SquareGiven an N by M grid of digits, find the area of the largest axis-aligned square whose four corner cells share the same digit.Easy3Brute forceMatrix+1No attempts yet2s128 MBJudgeable
RGB StreetGiven per-house costs for three colors, compute the minimum total cost to paint all houses in a line so that no two adjacent houses share a color.Easy3Dynamic programmingArrayNo attempts yet0.5s128 MBJudgeable
Finding the RankGiven a sorted list of scores with a capacity limit, compute the rank of a new score or return -1 if the list is full and the score is not higher than the last entry.Easy3ArrayImplementation+1No attempts yet2s128 MBJudgeable
Castle GuardsGiven a grid of guards, compute the minimum number of guards to add so every row and column has at least one, which equals the max of empty-row count and empty-column count.Easy3ArrayGreedy+1No attempts yet2s128 MBJudgeable
Switches On and OffSimulate switch toggles where male students flip every multiple of their number and female students flip the largest symmetric interval centered on their number.Easy3SimulationArray+2No attempts yet2s128 MBJudgeable
Symmetric DifferenceGiven two sets of natural numbers, compute the size of their symmetric difference.Easy3Hash mapArray+1No attempts yet2s256 MBJudgeable
War - Land GrabFor each region's list of soldier army IDs, find the majority element that appears more than half the time, or print SYJKGW if none exists.Easy3ArrayHash mapNo attempts yet10s512 MBJudgeable
Knight TourCheck whether a given sequence of 36 squares on a 6x6 board forms a valid closed knight's tour with legal moves between consecutive squares and back to the start.Easy3SimulationArray+1No attempts yet2s128 MBJudgeable
MessagesGiven sheets of names passed around a circle with P/N marks, find who wrote each hurtful (N) message and about whom.Easy3SimulationArray+2No attempts yet1s128 MBJudgeable
Transparent MosaicGiven N rectangular paper sheets on a 100x100 grid, count cells covered by more than M sheets.Easy3ArraySimulation+1No attempts yet2s128 MBJudgeable
Lucky TicketFind the longest even-length substring of a digit string whose first half digit sum equals its second half digit sum.Easy3Prefix sumBrute force+2No attempts yet2s128 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
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
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
Set DifferenceGiven two sets of up to 500,000 natural numbers each, output the count and sorted list of elements present in A but not in B.Easy3Hash mapSorting+1No attempts yet2s256 MBJudgeable
Maximum Subarray SumGiven up to 100,000 integers, compute the maximum sum of a non-empty contiguous subarray.Easy3Dynamic programmingArrayNo attempts yet1s128 MBJudgeable
Jumong's Armor MaterialsCount how many pairs of given numbers sum to a target value M, using each material at most once per pair.Easy3Two pointersArray+1No attempts yet2s128 MBJudgeable
OvertakingGiven entry and exit orders of N cars, count how many cars are not part of the longest common subsequence, meaning they overtook someone.Easy3Dynamic programmingArray+1No attempts yet2s128 MBJudgeable
Sum of Numbers 2Given N positive integers and a target M, count contiguous subarrays whose sum equals M.Easy3Two pointersPrefix sum+1No attempts yet0.5s128 MBJudgeable
StatisticsGiven N odd integers, compute and print the rounded mean, median, mode (second smallest if tied), and range.Easy3ArraySorting+1No attempts yet2s256 MBJudgeable
Picture ComparisonGiven N small 5x7 grids, find the pair of pictures with the fewest differing cells and output their indices.Easy3Brute forceMatrix+1No attempts yet2s128 MBJudgeable
2D Array Range SumBuild a 2D prefix sum over an N by M grid and answer up to 10,000 rectangle sum queries in O(1) each.Easy3Prefix sumMatrix+1No attempts yet2s128 MBJudgeable
Magic Square ClassificationRead multiple square matrices and classify each into one of five magic square categories based on row, column, diagonal sums, distinctness, and consecutiveness.Easy3MatrixImplementation+1No attempts yet1s128 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
Seven DwarfsGiven nine distinct heights, find seven that sum to exactly 100 and print them in ascending order.Easy3Brute forceArray+1No attempts yet2s128 MBJudgeable
Axis-Parallel LinesGiven n points, count how many horizontal or vertical lines pass through at least two of them.Easy3Hash mapArrayNo attempts yet2s128 MBJudgeable
Choosing Ice Cream in ItalyGiven N items and forbidden pairs, count the triples of items where no two form a forbidden pair.Easy3Brute forceArrayNo attempts yet1s128 MBJudgeable
SequenceFind the maximum length of a contiguous subarray of digits that is either nondecreasing or nonincreasing.Easy3ArrayDynamic programming+1No attempts yet1s128 MBJudgeable
RunningFor each runner, count how many runners ahead have higher ability and output that count plus one, using a running maximum.Easy3ArrayImplementationNo attempts yet1s256 MBJudgeable
Student Who Raises Both AveragesGiven two groups' IQ lists, count students in the first group whose IQ is below that group's average but above the second group's average.Easy3ArrayMath+1No attempts yet1s128 MBJudgeable
Representative Natural NumberFind the smallest integer minimizing the sum of absolute differences to a list of numbers, which is the lower median.Easy3SortingMath+1No attempts yet1s128 MBJudgeable
Two Representative Natural NumbersGiven up to 5,000,000 integers from 1 to 10,000, output the median (smallest if tie) and the rounded mean as representatives.Easy3MathSorting+1No attempts yet2s256 MBJudgeable
Temperature SequenceFind the maximum sum of any K consecutive elements in an array of N temperatures.Easy3Sliding windowPrefix sum+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
Paper CuttingGiven a rectangular sheet and a series of horizontal or vertical cuts along grid lines, compute the area of the largest resulting piece.Easy3SortingArray+1No attempts yet1s128 MBJudgeable
Line UpFind the minimum number of children to move so the line ends in sorted order, equivalent to N minus the longest increasing subsequence length.Easy3Dynamic programmingArrayNo attempts yet1s128 MBJudgeable
Housing Complex NumberingGiven a binary grid, count connected groups of adjacent 1-cells and print the number of groups plus each group's size in ascending order.Easy3BFSGraph+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
Equal-Sum SegmentsSplit an array into contiguous segments with equal sums and output the smallest possible such common sum.Easy3Prefix sumGreedy+1No attempts yet1s128 MBJudgeable
Memory MasterFor each queried integer, check whether it exists in a large set of stored integers and print 1 or 0 for up to a million queries per test case.Easy3Hash mapArray+1No attempts yet2s256 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
Sangbeom's GameGiven a grid with two players' king pieces, compute for each player the sum over all pairs of their kings of the Chebyshev distance between them.Easy3MathArray+1No 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
Ancient LockGroup locks by whether one lock's row sequence is a constant horizontal shift of another, and count the number of distinct groups (keys) needed.Easy3ArrayHash map+1No 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