The 18-th Beihang University Collegiate Programming Contest (BCPC 2023) - Preliminary
15 problems from The 18-th Beihang University Collegiate Programming Contest (BCPC 2023) - Preliminary (contest 104880), difficulty -. 14/15 solutions verified against sample I/O.
The 18-th Beihang University Collegiate Programming Contest (BCPC 2023) - Preliminary
Special | 15 problems | 14/15 verified | Difficulty - | 12m 49s
| # | Problem | Rating | Tags | Accepted | Time | ✓ |
|---|---|---|---|---|---|---|
| A | Well Rested | 42s | ✓ | |||
| B | \u6bd5\u4e1a\u5408\u7167 | 54s | ✓ | |||
| C | \u5492\u8bed\u8ba1\u6570 | 48s | ✓ | |||
| D | \u65e0\u58f0\u4e4b\u6b4c | 48s | ✓ | |||
| E | Serval \u7684\u6811 | 31s | ||||
| F | \u706b\u67f4\u68d2\u7b49\u5f0f | 51s | ✓ | |||
| G | \u77f3\u5b50\u914d\u5bf9 | 48s | ✓ | |||
| H | \u77e9\u9635\u4e58\u6cd5 | 47s | ✓ | |||
| I | \u574f\u6389\u7684\u8ba1\u6570\u5668 | 46s | ✓ | |||
| J | while (1) replace; | 1m 6s | ✓ | |||
| K | Power Shift | 50s | ✓ | |||
| L | \u6570\u5217\u8ba1\u6570 | 1m 16s | ✓ | |||
| M | Easy XOR problem | 1m 16s | ✓ | |||
| N | Purble Shop | 42s | ✓ | |||
| O | Toxel \u4e0e\u5b57\u7b26\u4e32\u5339\u914d | 44s | ✓ |
CF 104880G - 石子配对
We are given a multiset of stone types, where each type has a value and a quantity. Altogether there are exactly $2n$ stones, so every stone must be used exactly once in pairing. When we pair two stones with values $x$ and $y$, they contribute a score equal to $(x + y) bmod k$.
CF 104880O - Toxel 与字符串匹配
We are given two integer arrays, one of length n and another of length m. We imagine sliding the shorter array over the longer one in every possible relative alignment, including positions where they only partially overlap.
CF 104880N - Purble Shop
We are interacting with a hidden array of length $n$, where each position represents an item of clothing and stores a color from $1$ to $n$.
CF 104880M - Easy XOR problem
We are given a collection of binary strings, each of equal length. You can think of each string as a number written in base 2 with a fixed number of bits.
CF 104880L - 数列计数
We are given a digit sequence of length $n$, and every contiguous segment $[l, r]$ is interpreted as a decimal number.
CF 104880J - while (1) replace;
We are given an unknown string consisting only of the characters a, b, and c, with length at most 10. We are not allowed to read or query the string directly. Instead, we are allowed to apply a special operation replace(x, y) multiple times.
CF 104880K - Power Shift
We are given an array of length n, and we need to support three kinds of operations applied over ranges or single positions. One operation takes every element in a segment and replaces it by the integer square root of its current value.
CF 104880I - 坏掉的计数器
We are given a digit display built from seven-segment components, but some of the segments are broken and always stay off. The device shows an n-digit number, and each digit is rendered independently using the standard seven-segment encoding.
CF 104880H - 矩阵乘法
We are counting how many 8-number configurations produce a very specific kind of “matrix identity”, but the real content of the problem is simpler than it first appears. Each configuration consists of eight integers, all chosen independently from the range 1 to 99.
CF 104880F - 火柴棒等式
We are given a mathematical expression formed using matchstick digits, either in the form $a + b = c$ or $a - b = c$, where each number is written in a fixed 7-segment style and all digits lie in the range from 0 to 999.
CF 104880D - 无声之歌
We are given a sequence of integers and we look at all possible contiguous subarrays. Each subarray has a sum, and among all of these sums there is a maximum value, which is the classical maximum subarray sum.
CF 104880E - Serval 的树
We are given a tree with $n$ labeled nodes. We are allowed to repeatedly perform an operation where we pick a currently existing node, remove it, and delete all edges incident to it. Each such operation counts as one step.
CF 104880B - 毕业合照
We are given a set of people moving along an infinite straight line. Each person starts at a position $xi$ and then moves with constant velocity $vi$. All motion begins at the same moment, so time $t = 0$ is shared.
CF 104880C - 咒语计数
We are given a single string made of lowercase letters. The task is to count how many ways we can pick four positions in increasing order such that the characters at those positions form the pattern c, then v, then b, then b.
CF 104880A - Well Rested
We are given a fixed schedule encoded as a binary string of length 24. Each position corresponds to one hour of a day, starting from hour 1 up to hour 24. A character 1 means you are working during that hour, while 0 means you are resting.