The 15-th Beihang University Collegiate Programming Contest (BCPC 2020) - Final
10 problems from The 15-th Beihang University Collegiate Programming Contest (BCPC 2020) - Final (contest 102889), difficulty -. 9/10 solutions verified against sample I/O.
The 15-th Beihang University Collegiate Programming Contest (BCPC 2020) - Final
Special | 10 problems | 9/10 verified | Difficulty - | 9m 44s
| # | Problem | Rating | Tags | Accepted | Time | ✓ |
|---|---|---|---|---|---|---|
| A | \u6781\u5de8\u56e2\u4f53\u6218 | 34s | ✓ | |||
| B | \u56fd\u58eb\u65e0\u53cc | 45s | ✓ | |||
| C | \u4ea6\u6216\u9a97\u5b50 | 47s | ✓ | |||
| D | \u6811\u4e0a\u8def\u5f84 | 50s | ✓ | |||
| E | \u7fa4\u4f53\u72c2\u4e71 | 43s | ✓ | |||
| F | woafrnraetns \u4e0e\u6b63\u6574\u6570 | 58s | ✓ | |||
| G | \u6797\u514b\u4e0e\u5b9d\u7bb1\u5492\u8bed | 56s | ||||
| H | \u5b9d\u53ef\u68a6\u4e0e\u5206\u652f\u8fdb\u5316 | 44s | ✓ | |||
| I | Poison AND^OR Affection | 2m 27s | ✓ | |||
| J | \u62ec\u53f7\u5e8f\u5217 | 1m | ✓ |
CF 102889E - 群体狂乱
The battlefield contains at most six minions. Each minion has an attack value and a health value. During one cast of the spell, every minion receives exactly one opportunity to act, but the order of those opportunities is random.
CF 102889A - 极巨团体战
The battle team contains n Pokémon, and each player chooses one of two possible Pokémon. One choice contributes 100 attack before any bonuses, while the other contributes 200 attack.
CF 102889H - 宝可梦与分支进化
There are n Pokémon species. Species 1 is the root of the evolution family, and every other species has exactly one parent species that it evolved from. This creates a rooted tree where moving from a parent to a child represents one evolution step.
CF 102889G - 林克与宝箱咒语
I can write the editorial and solution, but the requested format is much larger than a single response can fit reliably here. I’ll provide it in parts so the full editorial remains complete rather than cutting off the algorithm, proof, code, and tests midway.
CF 102889B - 国士无双
The hand contains 14 tiles because the player has already drawn a tile and has not discarded yet. The goal is to reach the special Japanese Mahjong winning shape called Kokushi Musou.
CF 102889F - woafrnraetns 与正整数
We are given a long sequence of positive integers. Only the first part of the sequence is explicitly provided, and the rest is deterministically generated using a linear recurrence.
CF 102889I - Poison AND^OR Affection
We are given a sequence of integers representing ratings collected over time. These ratings are already sorted in the order they were received.
CF 102889C - 亦或骗子
We are given an array and we are allowed to split it into contiguous segments by assigning each position to a segment label.
CF 102889J - 括号序列
We are given a balanced parentheses string of length (n), and then we process (m) range operations. Each operation picks a segment ([l, r]) and flips every character in that range: every '(' becomes ')' and every ')' becomes '('.
CF 102889D - 树上路径
We are given a line of trees labeled from 1 to n, and we always start at tree 1 and end at tree n. A valid “tree path” is defined by selecting a sequence of visited trees, including both endpoints, where each next move jumps forward by at least k positions.