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 results123 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
Swimming JamSimulate multiple swimmers sharing two lanes with blocking and end-of-lane reordering rules to compute the total time until everyone finishes their assigned laps.Medium7SimulationQueue+1No attempts yet1s128 MBJudgeable
Hit or MissSimulate a multi-player solitaire card game and either report the last card each player discarded or declare the position unwinnable.Medium7SimulationQueue+2No attempts yet1s128 MBJudgeable
Get Them AllSimulate the vehicle dispatch and routing rules to find when all contestants reach the contest site, or how many arrive by the time limit.Medium7SimulationImplementation+1No attempts yet1s128 MBJudgeable
Walking the PlankSimulate pirates crossing a one-at-a-time plank to ferry N items, honoring side-priority, FIFO queues, and ties broken by slowest pirate.Medium7SimulationQueue+1No attempts yet1s128 MBJudgeable
ExpressionsGiven a postfix expression, produce another postfix expression that the same algorithm evaluates to the same value when a queue replaces the stack.Medium7StackQueue+2No attempts yet1s128 MBJudgeable
AirportThe tower serves one of two waiting lines at each time to minimize the worst waiting position any aircraft receives.Medium7Binary searchGreedy+1No attempts yet1s128 MBJudgeable
Shortest Subsequence With Sum at Least XFind the length of the shortest contiguous subarray whose sum is at least X, or report -1 when none exists.Medium7Prefix sumQueueNo attempts yet3s256 MBJudgeable
KimchiPick bury and take-out days at most D apart to maximize aging days times take-out temperature plus crock value while temperatures fall.Medium7Dynamic programmingSliding window+1No attempts yet1s256 MBJudgeable
Iceberg OrdersSimulate an order book with iceberg orders that match by best price then priority and refresh visible tips until each incoming order fills or rests.Medium7SimulationHeap+1No attempts yet1s256 MBJudgeable
Snake Game SimulationSimulate a snake that grows on checkerboard food on a wrapping board with timed turns and report its length after death or one billion steps.Medium7SimulationQueue+2No attempts yet5s512 MBJudgeable
Flow ShopGiven N jobs processed through M stages in the same order with per-job times, and a smallest-label-first queue rule at each stage, find each job's finish time.Medium7SimulationQueue+1No attempts yet6s512 MBJudgeable
IncineratorMaintain a queue of waste and M incinerator cells under burn, query, append, and recycle commands, then report the final cells.Medium7ImplementationQueue+2No attempts yet2s512 MBJudgeable
Sehun's Gift ShopSimulate two workers racing to wrap gifts from a shared front queue, respecting order arrival times and a tie-break rule, then report which gift numbers each wrapped.Medium7SimulationImplementation+2No attempts yet1s512 MBJudgeable
RumorGiven a graph and initial spreaders, each uninfected person adopts the rumor once more than half of their neighbors believe it; report the adoption minute for everyone.Medium7GraphBFS+2No attempts yet10s1024 MBJudgeable
Burger KingSimulate multiple restaurant queues with dynamic employee replacements and arrivals, tracking the optimal switching strategy to find when the team can order.Hard8SimulationGreedy+1No attempts yet2s128 MBJudgeable
WhenExecute a complete When program, an event-driven language with simultaneous Set assignments and a rotating active-clause scheduler, and print its output.Hard8SimulationImplementation+2No attempts yet1s128 MBJudgeable
The Byteotian WarBoth players take turns discarding one of their top two cards and passing the other to the opponent; find the final score when both play optimally.Hard8Dynamic programmingGame theory+2No attempts yet1s128 MBJudgeable
New Year TrainAssign each wagon in input order to one of M queue tracks so wagons exit numbered 1 to N, choosing the lexicographically smallest assignment.Hard8GreedyQueue+1No attempts yet2s256 MBJudgeable
Back to the FutureGiven a graph of compatible pairs, find the largest vertex subset where each chosen vertex has at least A neighbors and at least B non-neighbors inside the subset.Hard8GraphGreedy+2No attempts yet2s512 MBJudgeable
The ABCD MurdererFind the fewest word occurrences needed to cover a target text exactly when cut-outs may overlap on matching text, or report -1 if impossible.Hard8String matchingArray+2No attempts yet2s512 MBJudgeable
ChampionshipsFind the largest set of vertices in an undirected graph that is connected and where every vertex has at least d neighbors inside the set.Hard8GraphImplementation+2No attempts yet2s512 MBJudgeable
Right-hand obstructionCars arrive in four queues at a crossroad; a front car passes only if the queue on its right is empty, so simulate second by second and report each car's crossing time or -1.Hard8SimulationQueue+2No attempts yet1s512 MBJudgeable
Asynchronous ExceptionsSimulate a multithreaded scheduler with yields, kills, fork modes, loops, and semaphores, then report each thread's finishing time and the final state.Hard9SimulationHeap+2No attempts yet5s512 MBJudgeable