The 2023 CCPC (Qinhuangdao) Onsite (The 2nd Universal Cup. Stage 9: Qinhuangdao)
13 problems from The 2023 CCPC (Qinhuangdao) Onsite (The 2nd Universal Cup. Stage 9: Qinhuangdao) (contest 104787), difficulty -. 12/13 solutions verified against sample I/O.
The 2023 CCPC (Qinhuangdao) Onsite (The 2nd Universal Cup. Stage 9: Qinhuangdao)
Special | 13 problems | 12/13 verified | Difficulty - | 13m 19s
| # | Problem | Rating | Tags | Accepted | Time | ✓ |
|---|---|---|---|---|---|---|
| A | Make SYSU Great Again I | 1m 25s | ✓ | |||
| B | Yet Another Subsequence Problem | 49s | ✓ | |||
| C | Palindrome | 39s | ||||
| D | Yet Another Coffee | 50s | ✓ | |||
| E | Coloring Tape | 54s | ✓ | |||
| F | Mystery of Prime | 49s | ✓ | |||
| G | Path | 1m 15s | ✓ | |||
| H | Quake and Rebuild | 1m 17s | ✓ | |||
| I | Phony | 1m 2s | ✓ | |||
| J | Keyi LIkes Reading | 47s | ✓ | |||
| K | Make SYSU Great Again II | 1m 40s | ✓ | |||
| L | Yet Another Maximize Permutation Subarrays | 52s | ✓ | |||
| M | Inverted | 1m | ✓ |
CF 104787A - Make SYSU Great Again I
We are given an $n times n$ grid and we must place the numbers $1$ through $k$, each exactly once, into distinct cells of the grid. All other cells remain empty. The placement must satisfy two structural constraints.
CF 104787G - Path
We are given two arrays, one of length $n$ and one of length $m$. They define an $n times m$ grid where every cell $(x, y)$ has a value formed by taking the sum of the value at row $x$ from the first array and the value at column $y$ from the second array.
CF 104787C - Palindrome
I can't produce the requested editorial because the prompt is missing the essential ingredient needed to derive the algorithm: the actual solution or enough information to reconstruct it.
CF 104787D - Yet Another Coffee
We are given a sequence of days, where each day has a base cost for buying a coffee. In addition, there are several coupons, and each coupon has a deadline day and a discount value.
CF 104787M - Inverted
We start with a tree on n vertices. Then we process n − 1 operations in a fixed order given by a permutation of nodes, and after each operation we are asked to count the number of spanning trees in a graph that keeps evolving.
CF 104787L - Yet Another Maximize Permutation Subarrays
We are given a permutation of size $n$, meaning it contains each number from 1 to $n$ exactly once. We are allowed to perform exactly one swap of any two positions, including the option of swapping a position with itself, which effectively means doing nothing.
CF 104787K - Make SYSU Great Again II
We are given an $n times n$ grid, and each cell must be assigned an integer from the range $[0, 4n^2 - 1]$. The assignment is not arbitrary, because two conditions must simultaneously hold. First, no number is allowed to appear more than five times in the whole grid.
CF 104787J - Keyi LIkes Reading
We are given a collection of words, but the only property that matters about each word is its length. Each day, Keyi chooses some words to study, and there is a special rule: if she decides to study a word of length $k$, then she must study all words of length $k$ that day.
CF 104787I - Phony
We maintain a multiset of integers that changes over time, and we must support two kinds of operations efficiently.
CF 104787H - Quake and Rebuild
We are given a rooted tree whose nodes are labeled from 1 to n, and every node except the root stores a pointer to its parent. The structure is initially static, but it changes over time through operations that modify these parent pointers. Two types of operations occur.
CF 104787F - Mystery of Prime
We are given a sequence of positive integers and we are allowed to change values in it. The goal is to transform it so that every pair of adjacent elements sums to a prime number, while changing as few positions as possible.
CF 104787E - Coloring Tape
We are given a grid with a small height but potentially long width. The grid has n rows and m columns. In the first column, every row already contains a distinct “brush” that starts coloring from that cell.
CF 104787B - Yet Another Subsequence Problem
We are given two large integers, $A$ and $B$, which determine a binary string built by a deterministic greedy process. The process starts with zero occurrences of both symbols and repeatedly appends either a 0 or a 1 until exactly $A$ zeros and $B$ ones have been used.