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,405 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
The 3n+1 SequenceStarting from the given first term, apply the 3n+1 rule until the value first hits 1 and report that position.Easy2SimulationMath+1No attempts yet1s512 MBJudgeable
Von Neumann and the FlyGiven train speed S, fly speed T, and initial gap D, compute how far the fly travels before the two trains collide.Easy2MathImplementation+2No attempts yet1s512 MBJudgeable
Soccer SkillsAmong all teammates whose distance from you is between a and b, print the position, distance, and angle of the one with smallest x then smallest y.Easy2ImplementationGeometry+1No attempts yet2s512 MBJudgeable
I Work All DayGiven a list of saw settings and a tree height T, pick the setting H that minimizes T mod H, breaking ties by first appearance.Easy2ImplementationBrute force+1No attempts yet1s512 MBJudgeable
Just A MinimGiven a list of note codes, sum their lengths in semibreves and print the exact value.Easy2MathImplementationNo attempts yet2s512 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
Coffee MachineGiven the number of employees on each of three floors, pick the floor for one coffee machine that minimizes total daily stair time.Easy2Brute forceMath+1No attempts yet1s1024 MBJudgeable
Happy TrailsGiven trail sections as angles and distances, compute the total elevation change and print it rounded to two decimals.Easy2MathImplementationNo attempts yet2s512 MBJudgeable
Arggggggh!Follow a start point and a series of compass moves to compute the final coordinates, rounded to 8 decimals.Easy2ImplementationMath+1No attempts yet2s512 MBJudgeable
Life SavingsCompare the savings from one 20%-style whole-purchase coupon against the best way to spend two one-item coupons on two of three items, then print the winning plan and its savings.Easy2Brute forceMath+2No attempts yet2s512 MBJudgeable
Nine KnightsGiven a 5x5 board, check whether it has exactly nine knights with no two attacking each other.Easy2ImplementationSimulationNo attempts yet2s512 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
No DuplicatesRead a line of space-separated uppercase words and print yes if no word repeats, or no if any word appears more than once.Easy2StringHash map+1No 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
Congruent NumbersGiven the two legs of a right triangle as fractions p1/q1 and p2/q2, print 1 if the triangle's area is an integer, otherwise 0.Easy2MathNumber theory+1No attempts yet2s512 MBJudgeable
Boolean SatisfiabilityCount the assignments of a disjunction of single literals that make the formula true, where each variable takes true or false.Easy2CombinatoricsMath+2No attempts yet3s512 MBJudgeable
Atomic MassParse a short chemical formula, look up each element's atomic mass, multiply by any following count, and print the total with two decimals.Easy2StringHash map+2No attempts yet1s512 MBJudgeable
Incomplete BookGiven the first book takes k days and each later book takes twice the previous, count how many books finish by day d.Easy2MathSimulation+1No attempts yet1s512 MBJudgeable
Analysis of Advanced AnalyticsGiven daily page counts and a fixed notebook size, count how many notebooks are needed when each day's notes must fit in one notebook without splitting.Easy2SimulationGreedy+1No 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
Jousting TournamentPrint the fixed elimination schedule that pits competitors 1..n one by one, alternating winners between placeholders a and b.Easy2ImplementationSimulationNo attempts yet2s512 MBJudgeable
Kiwis vs KangaroosGiven a phrase, score each side by how often its letters appear in KANGAROO or KIWIBIRD, then report the higher score or a tie.Easy2ImplementationString+2No attempts yet2s512 MBJudgeable
Beautiful MusicFor each note sequence, check whether every consecutive pair is 2, 4, or 6 steps apart on the repeating 7-note scale, and print one of two messages.Easy2ImplementationString+1No attempts yet2s512 MBJudgeable
Letter CountCount how often each English letter appears in one line, ignoring case and non-letters, then print 26 rows of stars.Easy2StringImplementationNo attempts yet2s512 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
PiratesGiven a lowercase word, find the letter with the highest frequency and print that letter with its count.Easy2StringHash map+1No attempts yet2s512 MBJudgeable
Password checkFor each of N passwords, report valid if it has a lowercase letter, uppercase letter, digit, symbol, and length at least 12, else invalid.Easy2StringImplementationNo attempts yet2s512 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
Hissing MicrophoneGiven a lowercase string, check whether it contains two consecutive s characters and print hiss or no hiss.Easy2StringImplementationNo attempts yet1s512 MBJudgeable
Sum Squared Digits FunctionFor each of P datasets, convert the given integer n to base b, square each digit, and report the total with the dataset number.Easy2MathImplementation+1No attempts yet2s512 MBJudgeable
Santa's GiftsCompute the total straight-line distance from Santa's house through four given points in 3D and check it does not exceed the time limit X.Easy2MathGeometry+2No attempts yet5s512 MBJudgeable
Life ScoreFor each name, sum the letter values (A=1 to Z=26, spaces worth 0) and print the total, or PERFECT LIFE when the total is exactly 100.Easy2StringImplementationNo attempts yet2s512 MBJudgeable
Big number A+BRead two integers with up to 10000 digits and print their sum without leading zeros.Easy2StringMath+2No attempts yet1s256 MBJudgeable
A Simple ProblemGiven N, print the smallest positive multiple of N squared, which is just N squared itself.Easy2MathImplementation+1No attempts yet3s512 MBJudgeable
Check the CheckRead dish names and price-quantity pairs until the line TOTAL, then print PAY if the waiter's total is at most the sum of price times quantity, else PROTEST.Easy2ImplementationString+1No 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
Triangles from Five SticksGiven five distinct stick lengths, count how many 3-stick subsets can form a triangle with positive area.Easy2Brute forceGeometry+1No attempts yet2s512 MBJudgeable
Jaccard Similarity ThresholdGiven two small sets of digits, decide whether their Jaccard similarity is greater than 0.5.Easy2ImplementationMathNo attempts yet1s512 MBJudgeable
PencilsChoose either set X or set Y, buy any number of copies of that one set, and pay the least to reach at least N pencils.Easy2MathImplementationNo 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
Hash collision stringsPrint two length-N strings that differ but have equal Java String hashCode values, using the classic Aa/BB collision with a shared prefix.Easy2StringHash map+2No attempts yet2s512 MBJudgeable
Abbey CourtyardGiven the area of a square courtyard, compute the perimeter as 4 times the square root of the area, rounded to six decimal places.Easy2MathImplementation+1No attempts yet1s512 MBJudgeable
Cube BitsConvert each of n decimal integers (up to 3^20) to its base-3 representation without leading zeros.Easy2MathImplementationNo attempts yet4s512 MBJudgeable
Binary GamePrint the binary representations of 0 through n, concatenated with no separators.Easy2StringImplementationNo attempts yet1s256 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
RickRead one line and print NO if it exactly matches one of six given phrases, otherwise print YES.Easy2StringImplementationNo 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
Exceed or notGiven a, b, and r, print overflow if a*b exceeds r, otherwise print the product a*b.Easy2MathImplementation+1No attempts yet0.5s128 MBJudgeable
Derivative of a polynomial functionParse a linear polynomial written like 3x+5 or -x+2 and print the constant that is its derivative.Easy2StringImplementation+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
TeleportationGiven start a, end b, and a bidirectional teleporter linking x and y, find the minimum tractor distance to move from a to b, with the option to skip the teleporter.Easy2MathImplementation+2No attempts yet2s512 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
PLAYERJINAH’S BOTTLEGROUNDSGiven the coordinates of three distinct points, decide whether they lie on a single straight line.Easy2GeometryMath+1No attempts yet1s512 MBJudgeable
Master of the Shell GameGiven a string, perform T swaps of characters at the given 0-indexed positions in order and print the final string.Easy2StringSimulation+1No attempts yet1s128 MBJudgeable
Overflow and ModuloMultiply N integers and print the product modulo M, reducing after each multiplication to avoid overflow.Easy2MathImplementation+2No attempts yet1s512 MBJudgeable
What Is Your HandleSort N distinct handles by ASCII dictionary order and print the I-th one.Easy2SortingString+1No 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
HashingCompute the polynomial rolling hash of a lowercase string using base 31 modulo 1234567891.Easy2ImplementationMathNo attempts yet1s512 MBJudgeable
Matrix Multiplication CalculatorRead pairs of matrices with dimension lines, multiply them when the inner dimensions match, and print each result row wrapped in vertical bars, or print undefined.Easy2ImplementationMatrix+2No attempts yet2s512 MBJudgeable
Wak Sani SatayGiven daily satay and nasi impit sales, compute weekly net profit from fixed per-stick prices, meat and spice costs, and rounding to two decimals.Easy2ImplementationMathNo attempts yet2s512 MBJudgeable
Caesar CipherShift every letter of a string by k positions in the alphabet, wrapping around, and leave spaces, periods, and commas unchanged.Easy2StringImplementation+1No attempts yet1s64 MBJudgeable
What Does UCPC Stand For?Given one string, decide whether deleting some characters can leave exactly the subsequence UCPC, case sensitive.Easy2StringGreedy+1No attempts yet1s512 MBJudgeable
Mannequins on the Tracks!!Simulate a trolley moving through three zones under a sequence of wait and lever-pull actions, and count how many mannequins get run over in zone C.Easy2SimulationImplementationNo attempts yet2s512 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
Telemarketer or not?Given four digits, print "ignore" if the first and last are 8 or 9 and the middle two are equal, otherwise print "answer".Easy2ImplementationBrute forceNo attempts yet2s512 MBJudgeable
Occupy ParkingCount how many of the N parking spaces show 'C' in both the yesterday string and the today string.Easy2StringImplementation+1No 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
Larger Sport FacilityCompare the areas of two rectangular sports fields and print which school's field is larger or that it is a tie.Easy2ImplementationMathNo attempts yet2s512 MBJudgeable
What Is Today's Date?Print the current UTC year, month, and day as three lines, using the system date with no input.Easy2ImplementationNo attempts yet2s128 MBJudgeable
Baby BitesGiven n spoken words that are either "mumble" or a number, check if the i-th number equals i and output "makes sense" or "something is fishy".Easy2ImplementationStringNo attempts yet1s512 MBJudgeable
LukaGiven Luka's fixed position and a walk of unit steps, list the indices of steps after which the walker stands on Luka's cell or one of the eight neighbors.Easy2ImplementationSimulationNo attempts yet1s512 MBJudgeable
Pascal's TriangleGiven n and k with 1 <= k <= n <= 30, print the k-th entry of row n in Pascal's triangle, equal to C(n-1, k-1).Easy2MathCombinatorics+2No attempts yet1s256 MBJudgeable
Poker HandGiven five distinct cards, report the largest number of cards sharing one rank.Easy2Hash mapImplementationNo 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
Bessie and DaisyGiven three points on a grid, compare Bessie's 8-direction distance with Daisy's 4-direction distance to John and say who arrives first.Easy2MathGeometry+1No attempts yet1s128 MBJudgeable
Unraveling Monty HallCount how many of N trials hide the car behind door 2 or 3, since switching from door 1 wins exactly then.Easy2MathSimulation+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
Pizza DealCompare a slice's area per price with a whole pizza's pi*R1^2 per price and print the better deal.Easy2MathGeometry+1No attempts yet1s512 MBJudgeable
Mixing MilkSimulate 100 cyclic pours among three buckets, each pour moving as much milk as fits until the source empties or the target fills, and print the final amounts.Easy2SimulationImplementationNo attempts yet2s512 MBJudgeable
Winning ScoreGiven the counts of 3-point shots, 2-point field goals, and free throws for two teams, compute each team's total and report which team won or if the game tied.Easy2MathImplementationNo attempts yet1s512 MBJudgeable
Time to DecompressRead L lines, each with a count N and a character, and print that character repeated N times on its own line.Easy2StringImplementationNo attempts yet1s512 MBJudgeable
ElderTrack which wizard owns the Elder Wand after each duel and count how many distinct wizards ever held it.Easy2SimulationImplementation+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
Magnet ChainGiven up to 5 magnets as a 1/2 sequence, decide whether the chain is fully connected after at most one magnet flip.Easy2ImplementationBrute force+2No attempts yet1s256 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
Junseok's Math HomeworkFor each query value N, sum every positive multiple of 3 or 7 that does not exceed N.Easy2MathImplementationNo attempts yet0.5s256 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
Physics HomeworkFor each test case, find the time at which car A, starting slower than car B and accelerating, reaches or passes car B's constant speed.Easy2MathImplementation+2No attempts yet1s256 MBJudgeable
Card Factory (Small)One card is flipped a number of times; report the side showing after all flip orders, where the visible side never changes.Easy2ImplementationMathNo attempts yet1s256 MBJudgeable
Vending MachineGiven a sequence of vending machine button presses with fixed prices, subtract the total cost from 5000 won and print the change.Easy2ImplementationMath+1No attempts yet1s256 MBJudgeable
XORChicGiven an XOR-encrypted string whose first 8 characters decode to "CHICKENS", recover the key and output the original string.Easy2ImplementationBit manipulation+2No attempts yet1s256 MBJudgeable
99 Bottles of BeerGiven N, print the full lyrics of the N Bottles of Beer song, with correct singular and plural wording.Easy2ImplementationString+2No attempts yet1s512 MBJudgeable
Cute Number~ε٩(๑> ₃ <)۶зGiven an integer up to 10^18, check whether its digits form an arithmetic sequence with a constant difference, and print one of two fixed messages.Easy2ImplementationMath+2No attempts yet1s512 MBJudgeable