Algorithmic Analysis and Implementations for Contest 883 Division 3

Problem A: Rope Cutting Condition The task requires determining how many ropes must be severed based on their attachment points. Each rope connects a nail at height a to a branch at height b. A cut is mandatory whenever the nail is positioned strictly higher than the branch. The algorithm iterates through all given pairs, evaluates this inequal ...

Posted on Sat, 04 Jul 2026 17:59:37 +0000 by nmohamm

Shortest Path with Time-Based Road Blockages

Problem Overview Given a graph with (n) intersections ((n \le 10^3)) and (m) bidirectional roads ((m \le 10^4)), a person named T moves first along a predetermined path (c_1, c_2, \ldots, c_g). Each road has a travel time (f[u][v]). When T traverses a road, that road becomes blocked for the entire duration of T's crossing. Luka starts from inte ...

Posted on Tue, 23 Jun 2026 17:27:31 +0000 by Nick~C

Dijkstra Algorithm Implementation Guide

Dijkstra Algortihm: O(n²) Approach Dijkstra's algorithm solves the single-source shortest path problem for graphs with non-negative edge weights. It efficiently computes the minimum distance from a starting vertex to all other vertices using a greedy approach. Algorithm Overview Initialization: Set the source distance to 0 and all other vertic ...

Posted on Tue, 26 May 2026 18:58:39 +0000 by benyamin

Contest Round 33 Editorial: Emphasis on Algorithmic Thinking

A. Word Rearrangement This is a straightforward problem requiring only basic input/output handling. w1, w2 = input().split() print(w2) print(w1) B. Cooking Tangyuan The key idea is to simulate the process of using packages to fulfill cooking rounds. Each package contributes a fixed number of tangyuan, and excess can carry over. n, x, k = map(i ...

Posted on Sun, 17 May 2026 14:48:21 +0000 by Fjerpje