National Yang Ming Chiao Tung University 2025 Individual Programming Contest
8 problems from National Yang Ming Chiao Tung University 2025 Individual Programming Contest (contest 106132), difficulty -. 8/8 solutions verified against sample I/O.
National Yang Ming Chiao Tung University 2025 Individual Programming Contest
Special | 8 problems | 8/8 verified | Difficulty - | 7m 5s
| # | Problem | Rating | Tags | Accepted | Time | ✓ |
|---|---|---|---|---|---|---|
| A | Range Affine Update and Modulo Query | 1m 3s | ✓ | |||
| B | Number of Inversions | 53s | ✓ | |||
| C | Construct Permutation | 44s | ✓ | |||
| D | Permutation Swaps | 48s | ✓ | |||
| E | Expression Evaluation | 46s | ✓ | |||
| F | LCS of DFS orders | 1m 17s | ✓ | |||
| G | Torque Transmission | 47s | ✓ | |||
| H | Prescription Dosage | 47s | ✓ |
CF 106132C - Construct Permutation
We are given a multiset of integers and we are allowed to reorder them arbitrarily into a sequence. The goal is to decide whether we can arrange them so that every adjacent pair satisfies a modular relationship: the sum of each consecutive pair, taken modulo M, must equal a…
CF 106132D - Permutation Swaps
We start with the identity permutation, meaning the array contains numbers from 1 to n in increasing order. We are allowed to repeatedly apply a recursive construction that behaves like a binary splitting process.
CF 106132G - Torque Transmission
We are given a directed network of gears connected by shafts. Each shaft transfers torque from one gear to another, but only a fraction of the incoming torque survives, determined by an efficiency percentage on that shaft.
CF 106132H - Prescription Dosage
A patient is given a weight in kilograms and a prescribed total drug dosage in milligrams. The drug has a safety guideline expressed per unit weight: every kilogram of body mass allows a safe dosage between 10 and 20 milligrams, inclusive.
CF 106132F - LCS of DFS orders
We are working with a tree where each vertex can be chosen as a starting point for a preorder DFS traversal. In such a traversal, we visit a node, then recursively traverse its neighbors in some arbitrary order, producing a linear sequence of all vertices.
CF 106132E - Expression Evaluation
We are given a single arithmetic expression written as a compact string. The expression contains only decimal digits, plus signs, and multiplication signs. Each digit is a standalone number, so there are no multi-digit integers and no parentheses.
CF 106132A - Range Affine Update and Modulo Query
We are maintaining a very large array of integers, supporting two kinds of operations over it. The first operation applies an affine transformation to every element in a contiguous segment: each value a[i] is replaced by a[i] c + d.
CF 106132B - Number of Inversions
We are given a static array of integers and many independent operations. Each operation describes a segment of the array, and we conceptually perform three actions for that segment: reverse the subarray inside the interval, compute how many inversions the whole array would…