The 2024 CCPC Shandong Invitational Contest and Provincial Collegiate Programming Contest
13 problems from The 2024 CCPC Shandong Invitational Contest and Provincial Collegiate Programming Contest (contest 105385), difficulty -. 13/13 solutions verified against sample I/O.
The 2024 CCPC Shandong Invitational Contest and Provincial Collegiate Programming Contest
Special | 13 problems | 13/13 verified | Difficulty - | 13m 28s
| # | Problem | Rating | Tags | Accepted | Time | ✓ |
|---|---|---|---|---|---|---|
| A | Printer | 51s | ✓ | |||
| B | Triangle | 52s | ✓ | |||
| C | Colorful Segments 2 | 55s | ✓ | |||
| D | Hero of the Kingdom | 56s | ✓ | |||
| E | Sensors | 57s | ✓ | |||
| F | Divide the Sequence | 52s | ✓ | |||
| G | Cosmic Travel | 1m 36s | ✓ | |||
| H | Stop the Castle | 1m 6s | ✓ | |||
| I | Left Shifting | 45s | ✓ | |||
| J | Colorful Spanning Tree | 52s | ✓ | |||
| K | Matrix | 1m 20s | ✓ | |||
| L | Intersection of Paths | 1m 39s | ✓ | |||
| M | Palindromic Polygon | 47s | ✓ |
CF 105385K - Matrix
We are asked to construct an $n times n$ integer matrix using values from $1$ to $2n$, with two simultaneous requirements that interact in a very constrained way. First, every integer in the range $1 dots 2n$ must appear at least once somewhere in the grid.
CF 105385H - Stop the Castle
We are given a large infinite chessboard, but only a small number of cells are occupied by two types of objects: castles and existing obstacles.
CF 105385G - Cosmic Travel
We are given a fixed array of integers, and we imagine that every non-negative integer labels a “universe”. In universe j, each original value ai is transformed into ai XOR j, and then we sort these transformed values.
CF 105385D - Hero of the Kingdom
We are given a trading simulation where a player can repeatedly convert money into flour and then convert flour back into money at a better price. The player starts with some amount of gold and has a limited amount of time.
CF 105385C - Colorful Segments 2
We are given several independent test cases. Each test case consists of a set of closed segments on a number line, and we must assign each segment one of k colors. The restriction is that if two segments share the same color, they must not intersect at any point on the line.
CF 105385L - Intersection of Paths
We are given a weighted tree with up to half a million vertices, and each edge carries a weight that can change temporarily during each query. For every query we first modify exactly one edge weight, and then we are allowed to choose $k$ simple paths in the tree.
CF 105385M - Palindromic Polygon
We are given a convex polygon with vertices ordered counterclockwise. Each vertex carries a value, and we are allowed to pick any subset of vertices.
CF 105385J - Colorful Spanning Tree
We are given several test cases. Each test case describes a complete graph, but the graph is not defined on individual vertices directly. Instead, vertices are grouped by colors. For each color i, there are ai identical vertices.
CF 105385I - Left Shifting
We are given a string and we can rotate it cyclically to the left by some number of positions. A left shift by $d$ means taking the substring starting from position $d$ to the end and attaching the prefix $0 dots d-1$ at the end.
CF 105385E - Sensors
We are given a line of positions indexed from 0 to n − 1. Initially every position is marked red. Over time, we repeatedly pick one position and permanently flip it to blue. After each flip, we look at a collection of intervals, called sensors.
CF 105385F - Divide the Sequence
We are given an integer array and we are allowed to split it into exactly $k$ contiguous non-empty segments. Each segment contributes its sum, but the contribution is weighted by the segment’s position from the left.
CF 105385B - Triangle
We are given several test cases. In each test case, we receive a list of strings. We need to count how many triples of indices $(a, b, c)$ with $a < b < c$ satisfy a special “triangle” condition defined using string concatenation and lexicographic comparison.
CF 105385A - Printer
We are given several printing machines that run independently but contribute to the same shared goal: producing at least $k$ total copies of a document. Each printer does not work at a constant long-term rate in a simple linear way. Instead, it follows a cycle.