2024 China Collegiate Programming Contest (CCPC) Zhengzhou Onsite (The 3rd Universal Cup. Stage 22: Zhengzhou)
13 problems from 2024 China Collegiate Programming Contest (CCPC) Zhengzhou Onsite (The 3rd Universal Cup. Stage 22: Zhengzhou) (contest 105632), difficulty -. 13/13 solutions verified against sample I/O.
2024 China Collegiate Programming Contest (CCPC) Zhengzhou Onsite (The 3rd Universal Cup. Stage 22: Zhengzhou)
Special | 13 problems | 13/13 verified | Difficulty - | 14m 38s
| # | Problem | Rating | Tags | Accepted | Time | ✓ |
|---|---|---|---|---|---|---|
| A | A + B = C Problem | 55s | ✓ | |||
| B | Rolling Stones | 53s | ✓ | |||
| C | Middle Point | 51s | ✓ | |||
| D | Guessing Game | 1m 29s | ✓ | |||
| E | Permutation Routing | 1m 2s | ✓ | |||
| F | Infinite Loop | 1m 18s | ✓ | |||
| G | Same Sum | 1m 25s | ✓ | |||
| H | The Witness | 1m 7s | ✓ | |||
| I | Best Friend, Worst Enemy | 1m 11s | ✓ | |||
| J | Balance in All Things | 1m 9s | ✓ | |||
| K | Brotato | 1m 44s | ✓ | |||
| L | Z-order Curve | 52s | ✓ | |||
| M | Rejection Sampling | 42s | ✓ |
CF 105632A - A + B = C Problem
We are given three positive integers $pA, pB, pC$. Each integer defines the period of an infinite binary string. That means the string is completely determined by its first $p$ bits, and then those bits repeat forever.
CF 105632K - Brotato
A run in this game is a sequence of $n$ levels that must all be cleared in order. At each level, a single attempt either succeeds with probability $1-p$ or fails with probability $p$.
CF 105632H - The Witness
We are given a rectangular grid where each cell is colored either black or white. The grid is naturally embedded on a vertex lattice: an $n times m$ cell grid corresponds to $(n+1) times (m+1)$ lattice vertices, and moves are allowed only along unit edges between adjacent…
CF 105632L - Z-order Curve
We are given a way to enumerate all non-negative integers in a special spatial order called the Z-order curve. Instead of thinking of this as a formula, it is more helpful to view it as a single infinite directed walk over points indexed by integers, where each integer label…
CF 105632D - Guessing Game
We are given a growing sequence of pairs, and after each prefix we need to evaluate a hypothetical game on that prefix. For a fixed prefix of length k, imagine we pick one of the k indices i.
CF 105632G - Same Sum
We are given an array of integers that changes over time. Two operations are applied in sequence: one operation increases every element in a contiguous segment by a fixed value, and the other asks whether a chosen segment can be rearranged into disjoint pairs such that every…
CF 105632M - Rejection Sampling
We are given a universe of elements from 1 to n, and each element i carries a weight ai. The goal is to design a randomized procedure that produces subsets of fixed size k using independent coin flips, followed by rejection of invalid outcomes.
CF 105632J - Balance in All Things
We are given 2n labeled players, all starting with score zero. The process runs for k rounds, and in every round we must split all players into disjoint pairs. Each pair plays a match, and exactly one point is transferred between the two participants.
CF 105632I - Best Friend, Worst Enemy
We are given a sequence of points, and they arrive one by one. Each point represents a person with coordinates $(xi, yi)$.
CF 105632F - Infinite Loop
We are given a fixed pattern of work that repeats every day forever. Each day has a timeline of k hours, and at the start of every day exactly n tasks appear. Task i of a day appears at a known hour ai within that day and requires bi hours of uninterrupted processing time.
CF 105632E - Permutation Routing
We are given a tree where each vertex holds exactly one number, and these numbers form a permutation of 1 through n. The goal is to transform this permutation into the identity configuration, meaning vertex i must end up holding value i.
CF 105632B - Rolling Stones
We are given a triangular grid whose rows grow as we go down, forming a total of roughly $n^2$ cells arranged in $n$ rows. Each cell contains a number from 1 to 4. We also have a tetrahedral die that moves on this grid.
CF 105632C - Middle Point
We start with four lattice points forming an axis-aligned rectangle: the origin, the point on the x-axis at distance A, the point on the y-axis at distance B, and the opposite corner (A, B).