Codeforces Round 902 (Div. 2, based on COMPFEST 15 - Final Round)
Solutions for Codeforces Round 902 (Div. 2, based on COMPFEST 15 - Final Round) (contest 1877). 2/7 problems verified against sample I/O. Difficulty range: 800-3300.
Codeforces Round 902 (Div. 2, based on COMPFEST 15 - Final Round)
Type: Div. 2 | Problems: 7 | Verified: 2/7 | Rating range: 800-3300 | Time: 15m 13s
| Problem | Name | Rating | Tags | Solve Time | Verified |
|---|---|---|---|---|---|
| A | Goals of Victory | 800 | math | 1m 32s | ✓ |
| B | Helmets in Night Light | 1000 | binary-search, greedy, sortings | 1m 46s | ✗ |
| C | Joyboard | 1200 | math, number-theory | 2m 1s | ✓ |
| D | Effects of Anti Pimples | 1500 | combinatorics, number-theory, sortings | 1m 57s | ✗ |
| E | Autosynthesis | 2100 | constructive-algorithms, graphs, implementation | 1m 43s | ✗ |
| F | Lexichromatography | 2500 | combinatorics, dsu | 3m 17s | ✗ |
| G | Ball-Stackable | 3300 | constructive-algorithms, data-structures, dp | 2m 57s | ✗ |
CF 1877F - Lexichromatography
We are asked to count the number of ways to colour an array of integers either blue or red, subject to two constraints.
CF 1877G - Ball-Stackable
We are given a tree where some edges already have a fixed direction and some edges are still undirected. We must choose directions for the remaining edges and assign a color to every edge. A walk may traverse an edge either along its direction or against it.
CF 1877E - Autosynthesis
We are given a sequence of positive integers indexed from left to right. We are allowed to repeatedly choose positions and “circle” elements. The key twist is that circling does not remove elements immediately; it only marks them.
CF 1877C - Joyboard
We choose a value $a{n+1}$ between $0$ and $m$. After that, every earlier position is determined uniquely by $$ai = a{i+1} bmod i$$ for $i=n,n-1,dots,1$. The entire array is generated from a single starting value.
CF 1877D - Effects of Anti Pimples
We are given an array indexed from 1 to n. We repeatedly choose a non-empty subset of indices and mark them as special. Those chosen indices are colored black. After that, any still-unselected index becomes green if it is a multiple of at least one black index.
CF 1877B - Helmets in Night Light
We are tasked with spreading an announcement to all residents of a village in the cheapest way possible. There are two ways to inform residents: Pak Chanek can directly tell someone at a fixed cost p, or a resident who already knows can inform others using a magical helmet…
CF 1877A - Goals of Victory
We have a round-robin football tournament with $n$ teams. Every pair of teams plays exactly one match. For each team, its efficiency is defined as: $$text{goals scored} - text{goals conceded}$$ After the tournament finishes, the efficiencies of all teams are computed.