The 7th China Collegiate Programming Contest, Finals (CCPC Finals 2021)
12 problems from The 7th China Collegiate Programming Contest, Finals (CCPC Finals 2021) (contest 103860), difficulty -. 10/12 solutions verified against sample I/O.
The 7th China Collegiate Programming Contest, Finals (CCPC Finals 2021)
Special | 12 problems | 10/12 verified | Difficulty - | 12m 51s
| # | Problem | Rating | Tags | Accepted | Time | ✓ |
|---|---|---|---|---|---|---|
| A | Mash | 51s | ✓ | |||
| B | Shuttle Bus | 2m 10s | ||||
| C | Selection Sort Count | 1m 7s | ✓ | |||
| D | Tree Partition | 1m 5s | ✓ | |||
| E | Elegant Tetris | 41s | ✓ | |||
| F | Modulo | 38s | ✓ | |||
| G | Integer Game | 45s | ✓ | |||
| H | Harie Programming Contest | 2m 5s | ||||
| I | Reverse LIS | 56s | ✓ | |||
| J | jwfw.harie.edu | 43s | ✓ | |||
| K | Security Plan | 43s | ✓ | |||
| L | Paid Leave | 1m 7s | ✓ |
CF 103860H - Harie Programming Contest
Let $H$ be an $mtimes n$ parity-check matrix over $mathbb{F}2$, and let $$f(x)= [Hx=0], qquad x=(x1,dots,xn)^T.$$ Fix a variable order $x1,dots,xn$.
CF 103860L - Paid Leave
We are given a timeline of $n$ days. Some days are fixed rest days (legal holidays). All other days are working days initially. We are allowed to convert additional working days into rest days, and these converted days are called paid leave.
CF 103860K - Security Plan
We are given an $n times m$ grid. We may choose any subset of cells and place a camera in each chosen cell. Each camera placed at $(i, j)$ does not directly “cover” a fixed shape; instead, it can be configured by selecting another cell $(p, q)$, and this configuration turns…
CF 103860J - jwfw.harie.edu
Each test case describes a hidden “answer key” for a 10-question multiple choice quiz, where every question has exactly one correct option among A, B, C, and D.
CF 103860I - Reverse LIS
We are given a binary string that is not written explicitly, but compressed as alternating runs of equal characters. Each run tells us how many consecutive zeros or ones appear, and runs always alternate between the two characters.
CF 103860G - Integer Game
We are given several independent games, each consisting of multiple integer intervals. Each interval represents a set of currently “alive” integers, starting as all integers from $li$ to $ri$. There is also a fixed multiplier $p 1$.
CF 103860D - Tree Partition
We are given a tree whose vertices are labeled from 1 to n. The task is to remove some edges so that the remaining connected components satisfy a strong ordering constraint: every component must correspond exactly to a contiguous segment in label order.
CF 103860F - Modulo
We are given an array of up to 21 positive integers and an initial value $x$. We are allowed to reorder the array arbitrarily. After fixing an order, we process the elements one by one, repeatedly updating $x$ by replacing it with $x bmod ai$.
CF 103860B - Shuttle Bus
Let $H$ be an $mtimes n$ parity-check matrix over $mathbb{F}2$, and let $$f(x)= [Hx=0], qquad x=(x1,dots,xn)^T.$$ Fix a variable order $x1,dots,xn$.
CF 103860E - Elegant Tetris
We are given a Tetris grid of width $w$ and a very small height, initially filled only in the bottom $n le 15$ rows. Above that, everything is empty. Some cells in these bottom rows are already occupied. No row is completely filled.
CF 103860C - Selection Sort Count
We are given a permutation of the numbers from 1 to n, and we run a modified selection sort on it. For each position i from left to right, we scan the suffix to the right of i and swap whenever we find a smaller element than the current value at position i.
CF 103860A - Mash
We are given a short program consisting of two types of instructions stored in an array-like structure. The execution does not run this list directly in order once; instead, it builds a second structure, a queue, and executes instructions from it dynamically.