Curated sets
Math and counting
Number theory, combinatorics, and geometry.
Total results6,670 problems
| Topics | Judge | |||||
|---|---|---|---|---|---|---|
| Dividing the Chocolate BarTwo brothers split an a by b chocolate bar with one straight cut so the two pieces differ in area as little as possible. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Overlapping Rectangle AreaGiven two axis-aligned rectangles, compute the area of their overlapping region. | Easy2 | Geometry | No attempts yet | 1s | 128 MB | Judgeable |
| Little SnowmanChoose whether the fixed ball k is the bottom, middle, or top of a three-ball snowman with halved volumes to maximize total volume within x liters. | Easy2 | MathBrute force | No attempts yet | 1s | 128 MB | Judgeable |
| Bouncing BallGiven drop height x and target w, find the smallest number of doublings that make x reach at least w. | Easy2 | Math | No attempts yet | 1s | 512 MB | Judgeable |
| Making Grid PaperPick the sheet that yields the most grid cells under the margin and spacing rules, breaking ties by area, and output its area. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| PaintsCompute the extra red, yellow, and blue paint to buy after splitting each mixed room amount evenly between its two base colors. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| TournamentFor each test case with n contestants and group size k, count how many contestants can reach the final survivors under some grouping. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Missing DigitsEach cipher hides one digit as x in A or B, and you try digits 0 to 9 to find the smallest that makes A divisible by B. | Easy2 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| Closing the CircuitShift every given upper pair forward by one position modulo n and print the sorted lower pairs after TAK. | Easy2 | ImplementationSorting+1 | No attempts yet | 3s | 128 MB | Judgeable |
| MondaysGiven year length N, week length M, and starting weekday L, count the days from 1 to N that fall on the first weekday. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Rock Paper ScissorsCompare the two players' winning chances from their move probabilities and print who is more likely to win each match. | Easy2 | ProbabilityMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| BookmakersDecide whether stakes on both match outcomes can guarantee a profit given decimal odds X and Y. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Power StripsGiven N cords and strips that add K outlets each, compute how many free outlets remain after connecting everything. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Changing a Light BulbCompute the sum 1 + 4 + ... + 4^(A-1) modulo 500000009 for the given level count A. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Old BillGiven N and middle digits XYZ, fill in the first and last digits of the five-digit total so N divides it, choosing the largest valid total. | Easy2 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| ClockFind the time with the median clock-hand angle among five given times, breaking angle ties by earlier time. | Easy2 | MathSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Mathematical CuriosityCount pairs 0<a<b<n where a squared plus b squared plus m is divisible by a times b. | Easy2 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| Addition in Different BasesAdd two numbers of up to 1000 digits in bases 1 to 35, including unary base 1, and print each equation with its sum in the same base. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Air speed of a fully laden swallowYou group messy swallow flight records by subspecies and compute two average speeds for each group. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Sir Bedavere's Bogus DivisionPrint every three-digit fraction with numerator in L to R that keeps its value after erasing the shared digit. | Easy2 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| Taunt Exposure EstimationRead CSV time measurements and estimate total exposure with the trapezoid rule, then print the range and integral with fixed rounding. | Easy2 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Consecutive Digits in a Rational NumberReport the base-7 digits in positions f through l after the point for the fraction n over d. | Easy2 | SimulationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Check DigitsRead numbers until a # line and print each with its mod-11 weighted check digit or Rejected. | Easy2 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Reducing Improper FractionsRewrite each given fraction as a mixed number, omitting the zero integer or fractional part. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Geometric InflationSimulate the monthly price recurrence with half-up cent rounding and print the Nth month cost with comma grouping. | Easy2 | SimulationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Arithmetic and Geometric SumsGiven N and the first three terms of an arithmetic or geometric series, detect the type and output the sum of the first N terms for each data set. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Monitor DPICompute horizontal and vertical DPI from diagonal size and resolution with the 16:9 ratio for each line until 0 0 0. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Fast Food PrizesAdd up, over disjoint prize sets, the prize value times the smallest sticker count among its required kinds. | Easy2 | GreedyMath+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Zombie InvasionProcess villages east to west, moving half of each village west and leaving at most one behind, with everything gathering on the west coast. | Easy2 | SimulationMath | No attempts yet | 2s | 128 MB | Judgeable |
| Von NeumannTwo trains approach each other while a fly shuttles between them, and the program prints how far the fly travels before they collide. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| The n Days of ChristmasFor each n until 0, compute the total gifts when day k of n brings k gifts down to 1. | Easy2 | MathImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Long is a train, a train is fast, fast is a planeCompute the travel time gap between a slower train and a faster plane over M km and print each gap as rounded H:MM:SS. | Easy2 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Perfect Number CheckDecide whether each given integer equals the sum of its proper divisors and print the equation or a negative verdict. | Easy2 | Number theoryImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Kids love candyEach test case gives candy piles and K, and asks for the most children who can each receive at least K pieces of a single kind. | Easy2 | MathGreedy | No attempts yet | 1s | 128 MB | Judgeable |
| Combination LockCount distinct triples of dial positions within circular distance 2 of either of two given combinations. | Easy2 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| VicinityFor each query, count how many of the n points lie within distance d_v of the chosen base point, excluding the base point itself. | Easy2 | Brute forceGeometry | No attempts yet | 1s | 128 MB | Judgeable |
| Stone Game 5Two players alternately take 1 or 3 stones from a pile of N, and the program prints SK or CY for optimal play. | Easy2 | Game theoryMath | No attempts yet | 1s | 128 MB | Judgeable |
| Anti-Arithmetic PermutationFor each permutation of 0 to n-1, decide whether any three terms in order form an arithmetic progression. | Easy2 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| Fibonacci remainderFor each test case, compute the P-th Fibonacci number of the sequence starting 1, 1 modulo Q and print it as Case #x: M. | Easy2 | MathSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Qurban 2011Given buffalo part orders and sheep orders, round buffalo parts up by seven and pack the animals into trips of three buffaloes or six sheep. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| BeeThe program counts logged jobs under each of seven bee work codes and prints each count with its share of the total. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Extending Goldbach's ConjectureThe program reads each m and prints whether m consecutive odd integers sum to m cubed and the first one when they do. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| The KingPick any subset of up to 100 values from minus 3 to 3 so the sum of the chosen values raised to the given power 1 to 3 is as large as possible. | Easy2 | GreedyMath | No attempts yet | 2s | 128 MB | Judgeable |
| Rectangle intersectionCompute the area shared by all n axis-aligned rectangles, or 0 when they do not all overlap. | Easy2 | GeometryIntervals | No attempts yet | 2s | 512 MB | Judgeable |
| EuclidRead two positive integers up to 32767 and print their greatest common divisor. | Easy2 | Number theory | No attempts yet | 2s | 512 MB | Judgeable |
| Zeros in a FactorialCount how many zero digits appear in the decimal representation of n factorial for a given n below 100. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| The Euclidean AlgorithmCount how many subtraction steps the original Euclidean algorithm needs to find the gcd of two integers up to 32767. | Easy2 | SimulationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Centroid of Point MassesCompute the mass-weighted average x and y over each point set and print each centroid rounded to two decimals. | Easy2 | MathImplementation | No attempts yet | 3s | 128 MB | Judgeable |
| Polar ExplorerGiven planet radius, fuel, and the angle to the crash site, decide if the round trip on the shorter arc fits and report leftover fuel or reachable miles. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Microwave ButtonsPress the 5-minute, 1-minute, and 10-second buttons to total exactly T seconds with the fewest presses, or print -1 when impossible. | Easy2 | GreedyMath | No attempts yet | 1s | 64 MB | Judgeable |
| Focal Length of a LensGiven object and image distances for each test case, compute the lens focal length and print it rounded to one decimal place. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Aligned CalendarConvert each Gregorian date into the 13-month calendar with 28-day months and report the leftover days as holidays. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Tax Rate ChangedFind the pair of pre-tax prices that summed to s after x% tax and gives the largest total after y% tax. | Easy2 | Brute forceMath | No attempts yet | 1s | 256 MB | Judgeable |
| Dice GameEach player rolls two dice with consecutive face ranges and the larger total wins, so compute both win probabilities from the four ranges. | Easy2 | ProbabilityBrute force | No attempts yet | 1s | 256 MB | Judgeable |
| Runway PlanningGiven each heading in degrees, compute the two-digit runway number by rounding and folding to the range 1 to 18. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Ice Bucket ChallengeFind the fewest ice-pouring participants needed to reach a donation goal when each pourer donates 10 and recruits K friends while skippers donate 100. | Easy2 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| HeadshotAfter a click on a circular cylinder, compare firing at once against spinning first and print which choice is safer. | Easy2 | ProbabilityString | No attempts yet | 1s | 64 MB | Judgeable |
| Radix 32 ConversionConvert each base-32 string of up to 8 digits to its decimal value and to binary by expanding every digit to 5 bits. | Easy2 | MathString | No attempts yet | 1s | 64 MB | Judgeable |
| Growling GearsFor each gear compute the vertex value of -aR^2 + bR + c and output the gear with the largest maximum. | Easy2 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| TriplesCount triples x<=y<=z<=m with x^j+y^j=z^j for each exponent j from 2 to n and print the total. | Easy2 | Brute forceMath | No attempts yet | 5s | 256 MB | Judgeable |
| Joy of FlightAdd up the wind drift over k seconds and, if the remaining distance fits the speed limit, print the evenly paced flight positions. | Easy2 | ImplementationSimulation+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Professor Tardiness MaxFind the largest integer t with t plus t squared at most d for each given class length. | Easy2 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| Hitting the TargetsCount, for each of up to 100 shot points, how many of up to 30 given rectangles and circles contain it, boundaries included. | Easy2 | GeometryImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Closest Web Color NameThe program maps each RGB triple to the closest of 16 named HTML colors by Euclidean distance, breaking ties by table order. | Easy2 | Brute forceMath | No attempts yet | 2s | 256 MB | Judgeable |
| Working HoursAdd signed hour and minute terms in a flexible format and print each total as H:MM. | Easy2 | ImplementationString+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Canteen CheckoutChoose the number of fixed-price 4-item set menus that minimizes the total bill for the tray. | Easy2 | Brute forceMath | No attempts yet | 1s | 64 MB | Judgeable |
| Comma Separated SumAdd all the natural numbers listed in the comma-separated string S. | Easy2 | StringMath | No attempts yet | 1s | 256 MB | Judgeable |
| Four NumbersAdd the two numbers formed by writing B directly after A and D directly after C. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| BeltsGiven each belt rotation ratio and twist, compute the last wheel speed and direction when the first wheel turns clockwise once per minute. | Easy2 | SimulationMath | No attempts yet | 1s | 256 MB | Judgeable |
| International MeetingConvert a HH:MM meeting time from one UTC offset to N coworker offsets and print each local time of day. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Veni, vidi, viciDrop the last letter of each odd-length ciphertext, then decode every letter pair into one plain letter with the given key. | Easy2 | StringMath | No attempts yet | 1s | 256 MB | Judgeable |
| Best guess in the random gamePick the number from 1 to N whose interval of radius K covers the most hidden values and report its coverage count. | Easy2 | MathIntervals | No attempts yet | 1s | 256 MB | Judgeable |
| Base Conversion 2Convert the decimal number N to base B, writing digits above 9 as uppercase letters. | Easy2 | MathImplementation | No attempts yet | 0.5s | 256 MB | Judgeable |
| Rocket height at last separationSimulate n rocket stages with the given thrust, mass, and burn time formulas and print the height when the last stage drops. | Easy2 | SimulationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Three Kangaroos 2Three kangaroos on integer points let an outer one jump between the other two, and each test case asks for the largest possible number of jumps. | Easy2 | GreedyMath | No attempts yet | 1s | 256 MB | Judgeable |
| Binomial Coefficient 1Compute the binomial coefficient N choose K for given N up to 10 and K between 0 and N. | Easy2 | CombinatoricsMath | No attempts yet | 1s | 256 MB | Judgeable |
| Pythagorean ExpectationAdd up each team's scored and allowed runs from the match records, apply the given formula, and print the largest and smallest values scaled by 1000. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| The Traveling OrienteererGiven point coordinates and lists of courses, compute each course total Euclidean length rounded to the nearest integer. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Decode the MessageThe program decodes each word into one character from its letter values modulo 27. | Easy2 | StringMath+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Counting zerosCount how many times the digit 0 appears when writing every integer from N to M. | Easy2 | Brute forceMath | No attempts yet | 3s | 256 MB | Judgeable |
| ElectionFor each test case, count how many coins overlap each coin and print the top name or TIE on ties. | Easy2 | GeometryBrute force+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Reverse the Binary DigitsRead N, write it in binary without leading zeros, reverse the digits, and print the reversed string as a decimal number. | Easy2 | Bit manipulationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Choosing an Exam SetYou compare exam sets by random-guess expected score and pick the highest, preferring fewer questions then the smaller number. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Minions' MasterFor each town, compute the average power and the percentage of residents above it, rounded to three decimals. | Easy2 | ImplementationMath | No attempts yet | 3s | 256 MB | Judgeable |
| Hangul 2Given one Hangul syllable, compute its one-based index in the ordered list of 11172 syllables. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Initial, Medial, FinalDecompose one Hangul syllable into its initial, medial, and optional final jamo and print each on its own line. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Compose a Hangul SyllableJoin the given choseong, jungseong, and optional jongseong into a single Hangul syllable and print it. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Margaret's Minute Minute ManipulationDecode two binary-clock matrices into times, add them modulo 24 hours, and print the sum in the same matrix format. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Creature Number SystemsConvert each given decimal number up to 5000 into the creature's base between 2 and 20, using letters A to J for digits above 9. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| PriceApply the sticker discount and then the optional coupon to each price, round to cents, and apply the extra cash rounding for cash payments. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| CypherDecrypt each message line by shifting its lowercase letters back by the Caesar shift computed from its date. | Easy2 | StringMath | No attempts yet | 1s | 256 MB | Judgeable |
| Time Limit CheckFor each case, evaluate f(N) times T from the named complexity and print TLE when it exceeds 10^8 times L. | Easy2 | MathImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Minimum Final Exam ScoreGiven project, paper, and midterm scores, compute the smallest integer final score from 0 to 100 that lifts the weighted grade to 90, or report impossible. | Easy2 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| The Big Eye in the SkyFor each point in the first quadrant, print its angle from the positive x-axis in degrees, rounded to the nearest integer. | Easy2 | MathGeometry | No attempts yet | 1s | 256 MB | Judgeable |
| DistributionYou split the integers from 0 to 2^N - 1 into 2^K boxes of equal size with equal total popcount by pairing each x with its bitwise complement. | Easy2 | Bit manipulationMath+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Mr. Gorbachev, Tear Down This Wall!Add up the lengths of the axis-aligned wall segments and report the total work hours split across the workers, rounded up. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Three Origami SquaresCut three equal axis-aligned squares from an h by w sheet and print the largest possible side length. | Easy2 | GeometryMath | No attempts yet | 2s | 256 MB | Judgeable |
| Distribution in MetagoniaRepeatedly peel off 2^a times the largest power of 3 fitting the odd part of the remainder until it hits zero, then print the pieces sorted. | Easy2 | SimulationMath+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Mountain BikingFor each segment top, starting from rest, accumulate slope acceleration to compute the arrival speed at the foot. | Easy2 | MathSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Jump King Choi JunminStarting from 0 with jumps of exactly k in either direction, count how many integers from a to b are multiples of k. | Easy2 | Math | No attempts yet | 1s | 256 MB | Judgeable |