brain

tamnd's digital brain — notes, problems, research

43815 notes

CF 1992E - Novice's Mistake

The task describes a very small “birthday arithmetic” model, but the twist is that the computation is not performed numerically in the usual way. Instead, the intermediate value is treated as a string, which completely changes how subtraction behaves.

codeforcescompetitive-programmingbrute-forceconstructive-algorithmsimplementationmathstrings
CF 1992B - Angry Monk

We are asked to compute the minimum number of operations required to merge a pre-cut potato casserole back into a single piece. The casserole has total length n and was cut into k pieces of lengths a1 through ak. Two operations are allowed.

codeforcescompetitive-programminggreedymathsortings
CF 1992D - Test of Love

We are given a river that behaves like a linear board of n cells. Each cell is either safe ground in the form of a log, dangerous water, or an instant-failure crocodile tile. The goal is to move from the left bank before the first cell to the right bank after the last cell.

codeforcescompetitive-programmingdpgreedyimplementation
CF 1992A - Only Pluses

We are given three small integers that represent the initial sizes of three factors contributing to a product. The final quantity we care about is the product of these three numbers, and we are allowed to improve it by performing at most five operations.

codeforcescompetitive-programmingbrute-forceconstructive-algorithmsgreedymathsortings
Kvant Math Problem 812

The sum is

kvantmathematicsolympiad
CF 1993F2 - Dyn-scripted Robot (Hard Version)

We are asked to simulate the movement of a robot inside a bounded rectangle, starting at the bottom-left corner. The robot follows a script of movements, each of which is one of the four cardinal directions.

codeforcescompetitive-programmingchinese-remainder-theoremmathnumber-theory
CF 1993E - Xor-Grid Problem

We are given a small matrix of integers, and the operations we can perform are unusual. For any row, we can replace every element with the XOR of the corresponding column. For any column, we can replace every element with the XOR of the corresponding row.

codeforcescompetitive-programmingbitmasksconstructive-algorithmsdpimplementation
CF 1993D - Med-imize

We are given an array of integers and a parameter $k$. We can repeatedly remove any contiguous subarray of length exactly $k$ from the array, shrinking it. Once the array's length is no longer greater than $k$, we stop.

codeforcescompetitive-programmingbinary-searchdpgreedy
CF 1993F1 - Dyn-scripted Robot (Easy Version)

We are simulating a deterministic robot moving on a grid that is bounded by a rectangle. The robot starts at the origin and repeatedly executes a fixed instruction string consisting of unit moves in four directions.

codeforcescompetitive-programmingbrute-forcechinese-remainder-theoremconstructive-algorithmsmathnumber-theory
CF 1993C - Light Switches

The problem involves an apartment with multiple rooms, each starting with its light turned off. Each room gets a chip installed at a distinct time, and each chip toggles the light in its room on and off periodically, with a period k minutes.

codeforcescompetitive-programmingimplementationmath
CF 1993A - Question Marks

We are given a multiple-choice test with $4n$ questions, where each of the four options 'A', 'B', 'C', 'D' is correct exactly $n$ times. Tim answers the questions but may leave some as '?', representing unknown answers.

codeforcescompetitive-programminggreedyimplementation
CF 1993B - Parity and Sum

We are given an array of positive integers, and we want all elements to share the same parity - either all even or all odd. The only allowed operation is to pick two elements of differing parity and add the larger number to the smaller.

codeforcescompetitive-programmingconstructive-algorithmsgreedy
Kvant Math Problem 763

Let

kvantmathematicsolympiad
Kvant Math Problem 749

Part (1) concerns the cyclic expression

kvantmathematicsolympiad
Kvant Math Problem 746

Let the square have side length $2$ and center $O$.

kvantmathematicsolympiad
Kvant Math Problem 788

Let

kvantmathematicsolympiad
CF 1995E2 - Let Me Teach You a Lesson (Hard Version)

We have $2n$ knights sitting at $n$ desks arranged in a circle. Each desk has exactly two knights, the first at position $2i-1$ and the second at $2i$. Each knight has an integer intelligence value.

codeforcescompetitive-programmingdata-structuresdpmatricestwo-pointers
CF 1995D - Cases

We are given a string of uppercase letters representing a text in an ancient language. The language uses only the first $c$ letters of the Latin alphabet, and each word in the language has a “case” determined solely by its last letter. Words can have lengths up to $k$.

codeforcescompetitive-programmingbitmasksbrute-forcedpstrings
CF 1995E1 - Let Me Teach You a Lesson (Easy Version)

We have 2n knights arranged around a circle. Desk i contains knights (2i-1, 2i), so every desk contributes a sum of two intelligence values. The only operation allowed is swapping opposite positions in the circle.

codeforcescompetitive-programming2-satdata-structuresdpmatricestwo-pointers
CF 1995C - Squaring

We are given several independent arrays, and for each one we are allowed to modify elements using a very specific operation: pick an index and replace the value at that position with its square. We may repeat this operation on the same index multiple times.

codeforcescompetitive-programmingbrute-forceconstructive-algorithmsgreedyimplementationmathnumber-theory
CF 1995B1 - Bouquet (Easy Version)

Each flower has two properties that are actually the same number: its petal count and its price. A flower with k petals costs exactly k coins. We may buy any subset of the flowers available in the store.

codeforcescompetitive-programmingbinary-searchbrute-forcegreedysortingstwo-pointers
CF 1995B2 - Bouquet (Hard Version)

We are given several independent scenarios. In each scenario, there are different flower types, each type having a petal value and a limited supply. Every flower costs exactly its petal value in coins, and we have a fixed budget. We want to build a bouquet under two restrictions.

codeforcescompetitive-programmingbinary-searchdata-structuresgreedymathsortingstwo-pointers
CF 1995A - Diagonals

We are working on an $n times n$ grid where each cell belongs to exactly one diagonal if we group cells by the value $i + j$. Every such value defines a diagonal that runs from the top edge toward the right or bottom edge depending on where it sits in the square.

codeforcescompetitive-programmingbrute-forcegreedyimplementationmath
CF 1996G - Penacony

The problem describes a circular town with n houses connected by roads that form a single cycle. Each house i connects to i+1, and the last house n connects back to house 1. Among these residents, there are m friendships, each linking two distinct houses.

codeforcescompetitive-programmingbrute-forcedata-structuresgraphsgreedyhashing
CF 1996F - Bomb

We are asked to maximize a score over a series of operations on two arrays. Each array has length $n$. Array $a$ represents the current “value” of each element, and array $b$ represents how much that element decays after it is used.

codeforcescompetitive-programmingbinary-searchgreedymath
CF 1996E - Decode

We are given a binary string, and we look at every possible contiguous segment of it. Each segment itself contains many subsegments, and we are interested only in those subsegments whose number of zeros equals the number of ones.

codeforcescompetitive-programmingcombinatoricsdata-structuresimplementationmath
CF 1996D - Fun

We need to count ordered triples of positive integers $(a,b,c)$ that satisfy two independent restrictions. The first restriction limits the pairwise products: $$ab + ac + bc le n$$ The second restriction limits the sum: $$a + b + c le x$$ The word "ordered" matters.

codeforcescompetitive-programmingbinary-searchbrute-forcecombinatoricsmathnumber-theory
Kvant Math Problem 731

The game begins with the first player choosing an initial value $P_0 \in {2,3,4,5,6,7,8,9}$.

kvantmathematicsolympiad
CF 1996C - Sort

We are given two strings, a and b, of equal length n. For each query, defined by a range [l, r], we are allowed to modify individual characters of a within that range. The goal is to transform the substring a[l..

codeforcescompetitive-programmingdpgreedysortingsstrings
CF 1996B - Scale

We are given a square grid of size $n times n$ where each cell contains either a zero or a one. The task is to reduce this grid by a factor $k$, which is guaranteed to divide $n$ evenly.

codeforcescompetitive-programminggreedyimplementation
CF 1996A - Legs

The farm has only chickens and cows, and Farmer John counts a total of n legs. Chickens contribute 2 legs each and cows contribute 4 legs each. The question asks for the smallest possible number of animals consistent with the total leg count.

codeforcescompetitive-programmingbinary-searchmathternary-search
Kvant Math Problem 721

Let $ABC$ be the given triangle.

kvantmathematicsolympiad
CF 1997F - Chips on a Line

We are given a one-dimensional line with positions numbered from 1 to $x$. We must place exactly $n$ chips on these positions, allowing multiple chips at the same position.

codeforcescompetitive-programmingbrute-forcecombinatoricsdpgreedymath
CF 1997E - Level Up

In this problem, Monocarp is traversing a linear sequence of monsters, each with a level. He starts at level 1 and can fight monsters whose levels are at least as high as his current level. Whenever he fights k monsters, he levels up by one.

codeforcescompetitive-programmingbinary-searchbrute-forcedata-structuresdivide-and-conquerimplementation
CF 1997D - Maximize the Root

We are given a rooted tree. Every vertex contains a non-negative number. An operation can be applied to any non-leaf vertex. When we choose a vertex $v$, we increase the value at $v$ by one and simultaneously decrease every other vertex in the subtree of $v$ by one.

codeforcescompetitive-programmingbinary-searchdfs-and-similardpgreedytrees
CF 1997B - Make Three Regions

We have a grid with only two rows. Some cells are free (.), some are blocked (x). Free cells form a graph where adjacent cells sharing a side are connected. A connected region is simply a connected component of this graph.

codeforcescompetitive-programmingconstructive-algorithmstwo-pointers
CF 1997A - Strong Password

We are asked to strengthen a password by inserting exactly one lowercase letter anywhere in an existing string. The password's strength is quantified by the time it takes to type it. Typing rules are simple: the first character always takes two seconds.

codeforcescompetitive-programmingbrute-forceimplementationstrings
CF 1997C - Even Positions

We are given a bracket sequence of even length, but every character at an odd position has been erased. Only the brackets at positions 2, 4, 6, ... remain.

codeforcescompetitive-programmingconstructive-algorithmsdata-structuresgreedy
CF 1998D - Determine Winning Islands in Race

We have a directed acyclic graph on islands 1...n. The graph always contains the chain 1 - 2 - 3 - ... - n and additionally contains m extra directed edges (u, v) with u < v. Bessie can only move along the chain edges. Elsie can move along both chain and extra edges.

codeforcescompetitive-programmingdata-structuresdpgraphsgreedyshortest-paths
CF 1998E2 - Eliminating Balls With Merging (Hard Version)

We are given a sequence of balls numbered from 1 to $n$, each labeled with a positive integer. For each prefix of length $i$ ($1 le i le n$), we want to determine how many positions $j$ can survive as the last remaining ball if we repeatedly merge pairs of neighboring balls…

codeforcescompetitive-programmingbinary-searchbrute-forcedata-structuresdivide-and-conquergreedyimplementation
Kvant Math Problem 726

Let the regular $2n$-gon have vertices $A_1,A_2,\dots,A_{2n}$ in cyclic order, and let $P$ be a point inside the polygon.

kvantmathematicsolympiad
CF 1998E1 - Eliminating Balls With Merging (Easy Version)

We are given a row of $n$ balls, each with an integer written on it. The operation we can perform repeatedly involves selecting two adjacent values in the set $S$ and merging them according to their relative sizes.

codeforcescompetitive-programmingbinary-searchbrute-forcedata-structuresdivide-and-conquergreedy
CF 1998C - Perform Operations to Maximize Score

We are given an array of integers a and a parallel binary array b. The array b indicates which positions in a can be incremented. Each increment operation increases a chosen a[i] by 1, and we can perform at most k operations in total.

codeforcescompetitive-programmingbinary-searchbrute-forceconstructive-algorithmsgreedyimplementation
CF 1998B - Minimize Equal Sum Subarrays

We are given a permutation p of length n. We must construct another permutation q of the same length. For every subarray [i, j], we can compare the sum of that segment in p with the sum of the corresponding segment in q.

codeforcescompetitive-programmingconstructive-algorithmsmathnumber-theory
CF 1998A - Find K Distinct Points with Fixed Center

We are given a target center point $(xc, yc)$ and an integer $k$. The task is not to optimize anything or search for a special configuration. We simply need to construct exactly $k$ distinct integer-coordinate points whose arithmetic mean is exactly $(xc, yc)$.

codeforcescompetitive-programmingconstructive-algorithmsimplementationmath
CF 1999G2 - Ruler (hard version)

We are asked to find a missing number on a special ruler, which behaves almost like a normal ruler but skips a single value $x$ between 2 and 999. If you try to measure an object smaller than $x$, the ruler gives the correct length.

codeforcescompetitive-programmingbinary-searchinteractiveternary-search
CF 1999G1 - Ruler (easy version)

We are interacting with a hidden parameter $x$ between 2 and 999 that defines a faulty measuring device. Whenever we measure a length $y$, the device behaves normally for small values, but once the true length reaches $x$ or more, it consistently over-reports by exactly 1 unit.

codeforcescompetitive-programmingbinary-searchinteractive
CF 1999E - Triple Operations

We are given a consecutive sequence of integers from $l$ to $r$ inclusive, written on a board. Ivy can repeatedly perform an operation on any two numbers $x$ and $y$: she replaces them with $3x$ and $lfloor y/3 rfloor$.

codeforcescompetitive-programmingdpimplementationmath
CF 1999F - Expected Median

We are given a binary array containing only 0 and 1. For every subsequence of length k, where k is odd, we compute its median and add all these medians together. The array is binary, which changes the nature of the median completely.

codeforcescompetitive-programmingcombinatoricsmath
CF 1999D - Slavic's Exam

The task asks for the sum of the digits of a two-digit number for multiple test cases. Each input number $n$ is guaranteed to be between 10 and 99 inclusive, so the first digit is always nonzero.

codeforcescompetitive-programminggreedyimplementationstrings
Kvant Math Problem 710

The requirement that no term is equal to the sum of several others is ensured by a stronger property: for every $n$, if

kvantmathematicsolympiad
CF 1999C - Showering

We are given a day of length m minutes and a set of non-overlapping tasks, each occupying a continuous interval of time.

codeforcescompetitive-programminggreedyimplementation
CF 1999B - Card Game

We are asked to compute the number of ways Suneet can win a two-round card game against Slavic. Each player has exactly two cards, each numbered between 1 and 10.

codeforcescompetitive-programmingbrute-forceconstructive-algorithmsimplementation
CF 1999A - A+B Again?

The task asks for the sum of the digits of a two-digit number for multiple test cases. Each input number $n$ is guaranteed to be between 10 and 99 inclusive, so the first digit is always nonzero.

codeforcescompetitive-programmingimplementationmath
CF 2000F - Color Rows and Columns

Each rectangle is a grid of $ai$ columns and $bi$ rows. We may color individual cells one by one. Whenever a row becomes completely colored, we gain one point. Whenever a column becomes completely colored, we also gain one point. The rectangles are independent.

codeforcescompetitive-programmingdpgreedyimplementationmath
CF 2000E - Photoshoot for Gorillas

We are placing weighted objects onto a grid, but the score is not just the sum of values on the grid. Instead, every placement contributes multiple times: each cell participates in several overlapping fixed-size $k times k$ sub-squares, and the total score is the sum over all…

codeforcescompetitive-programmingcombinatoricsdata-structuresgreedymath
CF 2000A - Primary Task

We are given a list of integers written on a board, and one of them might be a corrupted representation of a number of the form $10^x$ where $x ge 2$. The corruption happens because the exponentiation symbol '^' was lost.

codeforcescompetitive-programmingimplementationmathstrings
CF 2000C - Numeric String Template

The problem asks us to check whether a string matches a numeric template. The template is an array of integers where the same number should correspond to the same letter in a string, and the same letter should correspond to the same number.

codeforcescompetitive-programmingdata-structuresstrings
Kvant Math Problem 645

Normalize the speeds so that Warnicke moves with speed $1$ and the criminal with speed $\frac12$.

kvantmathematicsolympiad
CF 2001A - Make All Equal

We are given an array of integers arranged cyclically, which means the first and last elements are considered adjacent.

codeforcescompetitive-programminggreedyimplementation
CF 2001D - Longest Max Min Subsequence

We are asked to process a sequence of integers and find a subsequence that maximizes length while containing no repeated elements.

codeforcescompetitive-programmingbrute-forceconstructive-algorithmsdata-structuresgreedyimplementation
Kvant Math Problem 699

Working

kvantmathematicsolympiad
CF 2001E2 - Deterministic Heap (Hard Version)

We are asked to count deterministic max-heaps that can be formed on a perfect binary tree after performing a sequence of increment operations. The tree has height $n$, so it contains $2^n - 1$ nodes. Initially, all node values are zero.

codeforcescompetitive-programmingcombinatoricsdptrees
CF 2001E1 - Deterministic Heap (Easy Version)

Codeforces 2001E1: Deterministic Heap (Easy Version)

codeforcescompetitive-programmingcombinatoricsdpmathtrees
CF 2001C - Guess The Tree

We are asked to reconstruct a hidden tree with n nodes by interacting with a judge that answers specific distance-based queries. Each query "? a b" returns the node x that minimizes the absolute difference in distances from a and b.

codeforcescompetitive-programmingbinary-searchbrute-forcedfs-and-similardivide-and-conquerdsugreedyinteractivetrees
CF 2001B - Generate Permutation

We are asked to construct a permutation of integers from 1 to $n$ such that, no matter which of two typewriters Misuki uses, the number of required carriage returns to complete the permutation is identical.

codeforcescompetitive-programmingconstructive-algorithms
CF 2002H - Counting 101

We are asked to count sequences of integers with a very particular merging property. For a given sequence of length n, each element between 1 and m, we are allowed to repeatedly take three consecutive elements ai, a{i+1}, a{i+2} and merge them into a single number defined as…

codeforcescompetitive-programminggreedy
CF 2002F2 - Court Blue (Hard Version)

We are constructing a sequence of rounds where exactly one of two players gains a point in each round. After each round we maintain two counters, one for each player, and the process is only valid if at every prefix the greatest common divisor of the two counters never exceeds 1.

codeforcescompetitive-programmingbrute-forcedpmathnumber-theory
CF 2002F1 - Court Blue (Easy Version)

We are asked to plan a match between two performers, Lelle and Flamm, where each round produces a winner. The goal is to maximize the total score, which is computed as l WL + f WF, where WL and WF are the number of wins for Lelle and Flamm, respectively.

codeforcescompetitive-programmingbrute-forcedfs-and-similardpmathnumber-theory
CF 2002G - Lattice Optimizing

The problem asks only for existence or nonexistence in three classes. For part (1), it suffices to exhibit a tetrahedron that tiles space by congruent copies. For part (2), we must decide whether a congruent tiling by equifacial tetrahedra exists.

codeforcescompetitive-programmingbitmasksbrute-forcehashingmeet-in-the-middle
CF 2002E - Cosmic Rays

This is a Type C problem: a precise numerical count of admissible fillings is requested. The solution produces a combinatorial formula $an = 2^{n-1}$ and rigorously justifies it via bijection arguments and induction.

codeforcescompetitive-programmingbrute-forcedata-structuresdp
Kvant Math Problem 702

For the first values,

kvantmathematicsolympiad
CF 2002D2 - DFS Checker (Hard Version)

We are given a rooted tree where vertex 1 is the root. Alongside the tree, we maintain a permutation stored in an array indexed by positions, and we repeatedly swap two positions in this array.

codeforcescompetitive-programmingbinary-searchdata-structuresdfs-and-similargraphshashingtrees
CF 2002B - Removals Game

We have two players, Alice and Bob, each holding a permutation of the numbers from 1 to n. They will alternately remove elements from either end of their respective arrays. After n-1 turns, only one element remains in each array.

codeforcescompetitive-programmingconstructive-algorithmsgames
CF 2002D1 - DFS Checker (Easy Version)

We are given a perfect binary tree whose vertices are numbered in heap order. Vertex 1 is the root, and for every vertex i 1, its parent is i // 2. A permutation p of all vertices is maintained. After every query, two positions in the permutation are swapped.

codeforcescompetitive-programmingbrute-forcedata-structuresdfs-and-similargraphshashingtrees
CF 2002A - Distanced Coloring

We are given a rectangular grid with n rows and m columns. Each cell must be assigned a color, but colors are restricted by a distance rule: if two cells share the same color, then they must be sufficiently far apart in the Chebyshev sense, meaning the maximum of their row…

codeforcescompetitive-programmingconstructive-algorithmsimplementationmath
CF 2002C - Black Circles

This is a counting problem, so it falls under Type C. The goal is to determine the exact number of admissible fillings of the strip. The solution must provide a precise count and justify the enumeration rigorously.

codeforcescompetitive-programmingbrute-forcegeometrygreedymath
CF 2003F - Turtle and Three Sequences

This is a counting problem, so it is closest to Type C in the supplied classification. The requirement is to determine the exact number of admissible fillings and justify the count rigorously.

codeforcescompetitive-programmingbrute-forcedata-structuresdpgreedymathprobabilitiestwo-pointers
CF 2003E1 - Turtle and Inversions (Easy Version)

We are asked to find the maximum number of inversions in permutations of length $n$ that satisfy a specific "interesting" property defined by a set of intervals.

codeforcescompetitive-programmingbrute-forcedivide-and-conquerdpgreedymath
CF 2003E2 - Turtle and Inversions (Hard Version)

The problem gives us a permutation of integers from 1 to $n$ and asks us to consider certain "interesting" permutations based on a set of intervals.

codeforcescompetitive-programmingbrute-forcedata-structuresdivide-and-conquerdpgreedymathtwo-pointers
CF 2003D2 - Turtle and a MEX Problem (Hard Version)

The problem involves a turtle playing with several integer sequences and a non-negative integer $x$. For each sequence, the turtle can perform an operation exactly once: he sets $x$ to the $text{mex}$ of its current value together with the numbers in the chosen sequence.

codeforcescompetitive-programmingdfs-and-similardpgraphsgreedyimplementationmath
Kvant Math Problem 630

The point $M$ is defined from the circle through $P,Q,K$.

kvantmathematicsolympiad
CF 2003D1 - Turtle and a MEX Problem (Easy Version)

We are given several sequences of non-negative integers, and an initial integer $x$. Turtle can repeatedly choose any sequence and replace $x$ with the mex of $x$ together with all numbers in that sequence.

codeforcescompetitive-programminggreedymath
Kvant Math Problem 583

Let the stone masses be $x_1,\dots,x_n$ with $0<x_i\le 2$ and $\sum_{i=1}^n x_i=50$.

kvantmathematicsolympiad
CF 2003C - Turtle and Good Pairs

We are given a string consisting of lowercase letters, and our task is to reorder it to maximize the number of "good pairs.

codeforcescompetitive-programmingconstructive-algorithmsgreedysortingsstrings
CF 2003A - Turtle and Good Strings

We are asked to determine whether a given string can be split into two or more contiguous substrings such that no substring starts with a character that appears at the end of a later substring.

codeforcescompetitive-programminggreedystrings
CF 2003B - Turtle and Piggy Are Playing a Game 2

We are given a sequence of numbers and two players who repeatedly shrink it until only one value remains at the front position. Each move removes one element, but before removing it, the left element of the chosen adjacent pair is updated.

codeforcescompetitive-programminggamesgreedysortings
CF 2004D - Colored Portals

We are given a sequence of cities arranged on a line, each equipped with exactly two portals of different colors from a fixed set of four: blue, green, red, and yellow.

codeforcescompetitive-programmingbinary-searchbrute-forcedata-structuresgraphsgreedyimplementationshortest-paths
CF 2005E2 - Subtangle Game (Hard Version)

We have a sequence $a$ and an $n times m$ matrix $b$. The game follows the sequence from left to right. On move $k$, the current player must choose a cell whose value equals $ak$.

codeforcescompetitive-programmingdata-structuresdpgamesgreedyimplementation
CF 2005E1 - Subtangle Game (Easy Version)

This is a Type B (prove) problem. The solution correctly interprets the statement: it aims to prove that any triangle admitting a circle tangent to two sides and two medians must be isosceles.

codeforcescompetitive-programmingdpgamesgreedyimplementation
CF 2005D - Alter the GCD

We are given two arrays of equal length. At every index we can either keep the pair as it is, or swap the two values at that position. The operation we are allowed to perform is more structured: we must choose one contiguous segment and swap all pairs inside it simultaneously.

codeforcescompetitive-programmingbinary-searchbrute-forcedata-structuresdivide-and-conquerimplementationnumber-theory
CF 2005B2 - The Strict Teacher (Hard Version)

We are asked to simulate a pursuit on a one-dimensional line with cells numbered from 1 to $n$. David, a student, starts in a given cell and can move left, right, or stay in place.

codeforcescompetitive-programmingbinary-searchgreedymathsortings
CF 2005C - Lazy Narek

This is a Type B (prove) problem. The solution correctly interprets the statement: it aims to prove that any triangle admitting a circle tangent to two sides and two medians must be isosceles.

codeforcescompetitive-programmingdpimplementationstrings
CF 2005A - Simple Palindrome

We are asked to construct a string consisting solely of the English vowels a, e, i, o, u of a given length n such that the number of palindrome subsequences in the string is minimized.

codeforcescompetitive-programmingcombinatoricsconstructive-algorithmsgreedymath
CF 2005B1 - The Strict Teacher (Easy Version)

This is a Type B (prove) problem. The solution correctly interprets the statement: it aims to prove that any triangle admitting a circle tangent to two sides and two medians must be isosceles.

codeforcescompetitive-programminggreedymathsortings
Kvant Math Problem 579

For $n=1$ the inequality becomes

kvantmathematicsolympiad
CF 2006E - Iris's Full Binary Tree

We are building a tree incrementally, one node at a time. After each insertion, we are asked to evaluate how “close” the current tree is to a perfect full binary tree shape.

codeforcescompetitive-programmingbrute-forcedata-structuresdfs-and-similartrees
CF 2006F - Dora's Paint

This is a Type B (prove) problem. The solution correctly interprets the statement: it aims to prove that any triangle admitting a circle tangent to two sides and two medians must be isosceles.

codeforcescompetitive-programmingbrute-forcecombinatoricsconstructive-algorithmsgraphsimplementation
CF 2006C - Eri and Expanded Sets

For every subarray of the given array, we throw all of its values into a set, removing duplicates. Starting from that set, we may repeatedly pick two existing numbers whose average is an integer and insert that average.

codeforcescompetitive-programmingdata-structuresdivide-and-conquermathnumber-theorytwo-pointers
CF 2006D - Iris and Adjacent Products

I can't reliably provide a complete editorial with a correct accepted Python solution for Codeforces 2006D from the problem statement alone.

codeforcescompetitive-programmingdata-structuresgreedyimplementationmath