Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2)
Solutions for Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2) (contest 2034). 3/10 problems verified against sample I/O. Difficulty range: 800-3500.
Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2)
Type: Div. 1+2 | Problems: 10 | Verified: 3/10 | Rating range: 800-3500 | Time: 23m 2s
| Problem | Name | Rating | Tags | Solve Time | Verified |
|---|---|---|---|---|---|
| A | King Keykhosrow's Mystery | 800 | brute-force, chinese-remainder-theorem, math | 1m 20s | ✓ |
| B | Rakhsh's Revival | 1000 | data-structures, greedy, implementation | 1m 42s | ✗ |
| C | Trapped in the Witch's Labyrinth | 1400 | constructive-algorithms, dfs-and-similar, graphs | 3m 10s | ✓ |
| D | Darius' Wisdom | 1600 | constructive-algorithms, greedy, implementation | 1m 51s | ✗ |
| E | Permutations Harmony | 2200 | combinatorics, constructive-algorithms, greedy | 2m 25s | ✓ |
| F1 | Khayyam's Royal Decree (Easy Version) | 2500 | combinatorics, dp, math | 3m 48s | ✗ |
| F2 | Khayyam's Royal Decree (Hard Version) | 2800 | combinatorics, dp, math | 2m 20s | ✗ |
| G1 | Simurgh's Watch (Easy Version) | 3500 | constructive-algorithms, greedy, implementation | 2m 26s | ✗ |
| G2 | Simurgh's Watch (Hard Version) | 3500 | greedy, implementation | 1m 29s | ✗ |
| H | Rayan vs. Rayaneh | 3300 | brute-force, dfs-and-similar, dp | 2m 31s | ✗ |
CF 2034H - Rayan vs. Rayaneh
We are given a set of distinct positive integers. We want the largest subset with the property that no chosen number can be expressed as an integer linear combination of the remaining chosen numbers. For integers, the subgroup generated by a collection of numbers is very simple.
CF 2034G2 - Simurgh's Watch (Hard Version)
We are given a set of warriors, each assigned a watch interval defined by integer start and end times. At every integer moment covered by at least one warrior, we must ensure that among the warriors present, there is at least one color that occurs exactly once.
CF 2034F1 - Khayyam's Royal Decree (Easy Version)
We are simulating a random process where a bag is filled by repeatedly drawing items from a multiset containing two types of objects: red items worth 2 units and blue items worth 1 unit.
CF 2034G1 - Simurgh's Watch (Easy Version)
We are given a set of closed intervals on the real line. Each interval represents the active time of one warrior. We must assign a color to every interval. At every real time moment covered by at least one interval, we look at all intervals containing that moment.
CF 2034F2 - Khayyam's Royal Decree (Hard Version)
We are asked to compute the expected total value of a collection of gems after a stochastic process with multiplicative bonuses. Khayyam starts with a chest containing n red rubies, each worth 2, and m blue sapphires, each worth 1.
CF 2034E - Permutations Harmony
We need to construct $k$ distinct permutations of length $n$ such that if we look at any position $i$, the sum of the values appearing at that position across all $k$ permutations is the same for every position.
CF 2034C - Trapped in the Witch's Labyrinth
We are given a grid where each cell either forces movement in one of four directions or is still undecided. Starting from any cell, a token follows arrows step by step, leaving the grid immediately if it goes outside.
CF 2034D - Darius' Wisdom
We are given a sequence of stone columns, each with a base and a small number of inscriptions on top: either 0, 1, or 2. We can think of the sequence as an array of integers a[i] representing the number of inscriptions on the i-th column.
CF 2034B - Rakhsh's Revival
The problem models Rakhsh's body as a line of $n$ spots, where each spot is either weak ($0$) or strong ($1$). Rostam wants to ensure that in any consecutive interval of $m$ spots, at least one spot is strong.
CF 2034A - King Keykhosrow's Mystery
The problem asks us to find a number that satisfies two properties relative to two given numbers, $a$ and $b$. Specifically, we want the smallest integer $m$ such that $m$ is at least as large as one of the two numbers and the remainder of $m$ when divided by $a$ equals the…