The 2023 ICPC Asia Nanjing Regional Contest (The 2nd Universal Cup. Stage 11: Nanjing)
13 problems from The 2023 ICPC Asia Nanjing Regional Contest (The 2nd Universal Cup. Stage 11: Nanjing) (contest 104821), difficulty -. 1/13 solutions verified against sample I/O.
The 2023 ICPC Asia Nanjing Regional Contest (The 2nd Universal Cup. Stage 11: Nanjing)
ICPC/IOI | 13 problems | 1/13 verified | Difficulty - | 19m 51s
| # | Problem | Rating | Tags | Accepted | Time | ✓ |
|---|---|---|---|---|---|---|
| A | Cool, It's Yesterday Four Times More | 34s | ||||
| B | Intersection over Union | 1m 46s | ||||
| C | Primitive Root | 1m 37s | ||||
| D | Red Black Tree | 1m 28s | ||||
| E | Extending Distance | 2m 2s | ||||
| F | Equivalent Rewriting | 1m 35s | ||||
| G | Knapsack | 1m 9s | ✓ | |||
| H | Puzzle: Question Mark | 1m 40s | ||||
| I | Counter | 1m 49s | ||||
| J | Suffix Structure | 1m 20s | ||||
| K | Grand Finale | 1m 23s | ||||
| L | Elevator | 1m 21s | ||||
| M | Trapping Rain Water | 2m 7s |
CF 104821M - Trapping Rain Water
We are given a height array that represents a skyline of vertical bars. After each operation, one bar is increased, and we must compute how much water would be trapped between these bars if rain filled the valleys.
CF 104821L - Elevator
We are given a collection of parcel types. Each type describes how many identical parcels exist, where each parcel has a weight either 1 or 2 and must be delivered to a specific floor.
CF 104821K - Grand Finale
We are simulating a very constrained card game where a player has two ordered structures: an initial hand and a draw pile. The hand contains a special winning card, and the draw pile contains utility cards that may increase hand size temporarily by drawing more cards.
CF 104821I - Counter
We are given a counter that starts at zero and evolves through a long sequence of operations, but we never see the sequence itself. Each operation is either an increment by one or a reset that forces the counter back to zero.
CF 104821J - Suffix Structure
We are given a rooted tree where each edge carries a label from a very large alphabet. If we walk from the root to any node, the sequence of edge labels along that path forms a string. Let us call this string the node’s path-string.
CF 104821H - Puzzle: Question Mark
We are given an $n times n$ grid that must be covered as much as possible using identical puzzle pieces, where each piece occupies exactly four unit cells.
CF 104821E - Extending Distance
We are given a weighted grid graph. Each cell is a node, and edges exist only between horizontally or vertically adjacent cells.
CF 104821F - Equivalent Rewriting
We start with an array of length $m$, initially filled with zeros. Each operation $i$ takes a list of positions and overwrites all of those positions with the value $i$.
CF 104821G - Knapsack
We are given a collection of gemstones, each with a price and a beauty value. We start with a fixed amount of money and want to maximize the total beauty of gemstones we end up with.
CF 104821D - Red Black Tree
We are given a rooted tree where each node is colored either black or red. For any node, we look at its subtree and consider all root-to-leaf paths inside that subtree. A node is considered valid if every such path contains the same number of black nodes.
CF 104821B - Intersection over Union
We are given a convex quadrilateral defined by four points in order, which forms a rotated rectangle in the plane. This shape is fixed for each test case.
CF 104821C - Primitive Root
We are given a prime number $P$ and a non-negative integer $m$. For each integer $g$ in the range $0 le g le m$, we are asked to check a condition involving bitwise XOR and modular arithmetic: whether $$(g oplus (P-1)) bmod P = 1.