brain

tamnd's digital brain — notes, problems, research

41797 notes

Kvant Math Problem 769

Let $I=L$ be the incenter.

kvantmathematicsolympiad
Kvant Math Problem 768

Consider small values of $n$ first.

kvantmathematicsolympiad
Kvant Math Problem 767

For the first statement, choose coordinates so that the bisecting line $l$ is the vertical line $x=0$.

kvantmathematicsolympiad
Kvant Math Problem 764

The task is purely existential.

kvantmathematicsolympiad
Kvant Math Problem 762

The two inequalities are

kvantmathematicsolympiad
Kvant Math Problem 761

The statement is affine in nature.

kvantmathematicsolympiad
Kvant Math Problem 759

Let the outer convex quadrilateral be $ABCD$, and let the inner quadrilateral have vertices $P,Q,R,T$.

kvantmathematicsolympiad
Kvant Math Problem 757

Let an arithmetic progression of reciprocals be

kvantmathematicsolympiad
Kvant Math Problem 755

Consider a tetrahedron with vertices $A$, $B$, $C$, and $D$, and a point $M$ inside it.

kvantmathematicsolympiad
Kvant Math Problem 753

The problem gives three numbers $a$, $b$, $c$ in the interval $(0, \frac{\pi}{2})$ satisfying

kvantmathematicsolympiad
Kvant Math Problem 751

Begin by examining small examples.

kvantmathematicsolympiad
Kvant Math Problem 750

The first statement is a classical rectangle theorem.

kvantmathematicsolympiad
Kvant Math Problem 748

Consider first the planar problem with parabolas.

kvantmathematicsolympiad
Kvant Math Problem 747

For the first part, write the numbers as $x_1,\dots,x_n$, let $M=\max x_i$ and $m=\min x_i$.

kvantmathematicsolympiad
Kvant Math Problem 745

For the first problem, let

kvantmathematicsolympiad
Kvant Math Problem 743

Part (1) is the classical two-color complete graph statement.

kvantmathematicsolympiad
Kvant Math Problem 742

Let the points be represented by vectors $x_1,\dots,x_n$ from the center of the circle or sphere.

kvantmathematicsolympiad
Kvant Math Problem 740

Consider a right circular cylindrical pot with radius $R$ and height $H$.

kvantmathematicsolympiad
Kvant Math Problem 738

Consider a polygon in the plane, labeled $A_1 A_2 \dots A_n$.

kvantmathematicsolympiad
Kvant Math Problem 737

Let the houses have populations $h_1,h_2,\ldots,h_n$, arranged in nonincreasing order.

kvantmathematicsolympiad
Kvant Math Problem 735

Consider first the case of covering a circle of diameter $1$ with strips of paper.

kvantmathematicsolympiad
Kvant Math Problem 733

We begin by examining small powers of $31$ modulo powers of $2$ to understand the first part of the problem.

kvantmathematicsolympiad
Kvant Math Problem 732

I cannot write a rigorous solution to Kvant problem M732 because the problem statement itself is not present in your message.

kvantmathematicsolympiad
Kvant Math Problem 730

The sequence $(a_n)$ is defined recursively by $a_1=0$ and $a_{2n}=a_{2n+1}=n-a_n$.

kvantmathematicsolympiad
Kvant Math Problem 728

Consider a parallelepiped with vertex $P$ at the origin, edges along vectors $\vec{a}$, $\vec{b}$, $\vec{c}$ leading to adjacent vertices $A = P + \vec{a}$, $B = P + \vec{b}$, $C = P + \vec{c}$.

kvantmathematicsolympiad
Kvant Math Problem 727

Since the perimeter is $2$, we have

kvantmathematicsolympiad
Kvant Math Problem 725

The sequence $r_n$ sums the $n$-th powers of the cosines of the angles $\pi/7$, $3\pi/7$, and $5\pi/7$.

kvantmathematicsolympiad
Kvant Math Problem 724

Consider two turtles moving at the same speed but in different directions.

kvantmathematicsolympiad
Kvant Math Problem 722

Consider the simplest nontrivial cases first.

kvantmathematicsolympiad
Kvant Math Problem 720

The function $f$ is defined recursively on nonnegative integers.

kvantmathematicsolympiad
Kvant Math Problem 719

Consider small values of $n$ to understand the property.

kvantmathematicsolympiad
Kvant Math Problem 717

Consider small values of $n$ and $r$ to detect a pattern.

kvantmathematicsolympiad
Kvant Math Problem 716

Let

kvantmathematicsolympiad
Kvant Math Problem 714

Consider small values of $N$ to build intuition.

kvantmathematicsolympiad
Kvant Math Problem 713

Let the finite set be $M$.

kvantmathematicsolympiad
Kvant Math Problem 711

Consider a convex quadrilateral $ABCD$ inscribed in a circle with diagonals $AC$ and $BD$ perpendicular at some point $P$.

kvantmathematicsolympiad
Kvant Math Problem 709

The rhombus tiles are the unit lozenges of the triangular lattice.

kvantmathematicsolympiad
Kvant Math Problem 707

Let the clubs be represented by sets of students.

kvantmathematicsolympiad
Kvant Math Problem 706

Consider two circles with centers $O_1$ and $O_2$ and radii $R_1$ and $R_2$.

kvantmathematicsolympiad
Kvant Math Problem 703

The first equation links three expressions of the form $t + \frac{1}{t}$ multiplied by constants 3, 4, and 5.

kvantmathematicsolympiad
Kvant Math Problem 701

Let the sides of the acute triangle $LMN$ be

kvantmathematicsolympiad
Kvant Math Problem 700

Consider the set of all terminating decimal fractions.

kvantmathematicsolympiad
Kvant Math Problem 698

Let the cyclic quadrilateral be $ABCD$, with side lengths

kvantmathematicsolympiad
Kvant Math Problem 696

Consider the problem for small $k \times k$ squares.

kvantmathematicsolympiad
Kvant Math Problem 695

Let the table have $m$ rows and $n$ columns.

kvantmathematicsolympiad
Kvant Math Problem 693

Consider small-scale analogues of the village communication problem.

kvantmathematicsolympiad
Kvant Math Problem 692

Consider triangle $ABC$ with arbitrary side lengths $AB=c$, $BC=a$, $CA=b$.

kvantmathematicsolympiad
Kvant Math Problem 690

For a convex polygon, the quantity $\dfrac{2S}{P}$ has a geometric meaning.

kvantmathematicsolympiad
Kvant Math Problem 688

Let

kvantmathematicsolympiad
Kvant Math Problem 686

Let

kvantmathematicsolympiad
Kvant Math Problem 685

Let the partition be

kvantmathematicsolympiad
Kvant Math Problem 683

Represent each circle by a vertex, and join two vertices when the corresponding circles touch.

kvantmathematicsolympiad
Kvant Math Problem 681

Let

kvantmathematicsolympiad
Kvant Math Problem 680

The game is equivalent to building a connected graph on $n$ vertices by adding edges one at a time.

kvantmathematicsolympiad
CF 177G2 - Fibonacci Strings

We are given a very large Fibonacci-like string, but we are never asked to construct it directly. Instead, we are asked to count how many times each query string appears as a substring inside that Fibonacci string.

codeforcescompetitive-programmingmatricesstrings
CF 177G1 - Fibonacci Strings

We are given a very large string that is not explicitly constructed in the input. Instead, it is defined recursively in the same way as Fibonacci words: the first string is "a", the second is "b", and every later string is obtained by concatenating the previous string with the…

codeforcescompetitive-programmingstrings
Kvant Math Problem 678

Consider small examples first.

kvantmathematicsolympiad
CF 177F2 - Script Generation

We are given a bipartite graph between men and women. Each allowed edge represents a possible marriage and carries a positive weight that measures how much the audience enjoys that couple.

codeforcescompetitive-programming
CF 177F1 - Script Generation

We are given a bipartite set of characters: $n$ men and $n$ women. Between them there are $k$ possible marriage pairs, and each pair has a positive value representing audience delight if that couple ends up together.

codeforcescompetitive-programming
CF 177E2 - Space Voyage

We are choosing a positive integer value $x$, which represents how many “presents per suitcase” the Smart Beaver packs. The total number of suitcases is fixed: for each planet $i$, he carries exactly $ai$ suitcases, so the total number of suitcases is the sum of all $ai$.

codeforcescompetitive-programmingbinary-search
CF 177E1 - Space Voyage

The voyage is defined by a fixed sequence of planets. At each planet, the Beaver carries a fixed number of suitcases, and each suitcase contains the same number of presents, denoted by a single unknown value $x$.

codeforcescompetitive-programmingbinary-search
CF 177D2 - Encrypting Messages

We are given a sequence of integers representing a message and another shorter sequence representing a key. Both sequences are over a fixed modular range from 0 to c minus 1, and every addition wraps around modulo c. Encryption is defined as a repeated sliding process.

codeforcescompetitive-programmingdata-structures
Kvant Math Problem 676

We begin by computing small powers of $1981$ and observing the sums of their digits.

kvantmathematicsolympiad
CF 177D1 - Encrypting Messages

We are given a sequence of integers that represents a message, and another shorter sequence that acts as a repeating “window update pattern”. The encryption process repeatedly slides this pattern across the message from left to right.

codeforcescompetitive-programmingbrute-force
CF 177C2 - Party

We are given a set of people where some pairs are connected by friendship relations and some pairs are in conflict because they dislike each other.

codeforcescompetitive-programmingbrute-forcedfs-and-similardsugraphs
CF 177C1 - Party

We are given a set of people, where some pairs are friends and some pairs dislike each other. Friendship forms an undirected graph, and dislike forms another set of forbidden edges. The task is to choose a subset of people such that two constraints hold simultaneously.

codeforcescompetitive-programmingdfs-and-similardsugraphs
CF 177B2 - Rectangular Game

We start with n pebbles. At any move, if we currently have x pebbles, we must arrange them into a equal rows of length b, where a 1 and x = a · b. After creating the rows, we keep exactly one row and discard all others. The number of pebbles becomes b.

codeforcescompetitive-programmingnumber-theory
CF 177B1 - Rectangular Game

The game starts with n pebbles. At every move, we must split the current number of pebbles into a equal rows of size b, where a 1 and a b = current. After creating the rows, we keep exactly one row and throw away all others. That means the next number in the sequence becomes b.

codeforcescompetitive-programmingnumber-theory
Kvant Math Problem 674

Consider an acute triangle $ABC$ with arbitrary points $A_1$ on $BC$, $B_1$ on $AC$, and $C_1$ on $AB$.

kvantmathematicsolympiad
CF 176C - Playing with Superglue

We have two chips on an $n times m$ grid. On each turn, the first player moves exactly one non-glued chip by one square in the four-neighbor grid. After that, the second player permanently glues one currently empty square. A chip is allowed to move onto a glued square.

codeforcescompetitive-programmingcombinatoricsconstructive-algorithms
CF 176B - Word Cut

Each operation chooses a non-empty prefix and a non-empty suffix of the current word and swaps their order. If the current word is written as xy, where both x and y are non-empty, the operation transforms it into yx. A useful way to view this operation is as a cyclic rotation.

codeforcescompetitive-programmingdp
Kvant Math Problem 673

Label the pucks $A$, $B$, and $C$, and denote their initial positions by the points $A_0$, $B_0$, and $C_0$ of a triangle in the plane.

kvantmathematicsolympiad
CF 176E - Archaeology

We are given a weighted tree. Villages correspond to vertices and roads correspond to weighted edges. At any moment, only some villages are "alive". Villages can be added and removed over time.

codeforcescompetitive-programmingdata-structuresdfs-and-similartrees
CF 176D - Hyper String

Codeforces 176D: Hyper String

codeforcescompetitive-programmingdp
Kvant Math Problem 671

Let the cyclic quadrilateral be $ABCD$ with diagonals $AC$ and $BD$.

kvantmathematicsolympiad
CF 176A - Trading Business

We have several planets. On each planet, every item type has three values: - The price to buy one unit on that planet. - The price at which that planet buys one unit from us. - The number of units available for purchase.

codeforcescompetitive-programminggreedysortings
CF 175B - Plane of Tanks: Pro

Codeforces 175B: Plane of Tanks: Pro

codeforcescompetitive-programmingimplementation
CF 175A - Robot Bicorn Attack

We are given a string of digits that was formed by writing the scores from three game rounds one after another, without any separators. Originally there were exactly three non-negative integers.

codeforcescompetitive-programmingbrute-forceimplementation
CF 175F - Gnomes of Might and Magic

I can’t provide the complete editorial and verified Python solution for this problem from the information available to me alone. This is a very old Codeforces 3000-rated problem, and the accepted solution is quite intricate.

codeforcescompetitive-programmingdata-structuresgraphsimplementationshortest-paths
Kvant Math Problem 669

Consider a cyclic quadrilateral $ABCD$ with circumcircle $\Gamma$.

kvantmathematicsolympiad
CF 175E - Power Defence

Codeforces 175E: Power Defence

codeforcescompetitive-programmingbrute-forcedpgeometrygreedy
CF 175D - Plane of Tanks: Duel

Two tanks start fighting at time 0. Both fire immediately, then continue firing every dt seconds. Each shot may fail to penetrate armor, and if it penetrates, the damage is chosen uniformly from an integer interval.

codeforcescompetitive-programmingbrute-forcedpmathprobabilities
CF 175C - Geometry Horse

We have several types of geometric figures. Type i contains ki identical figures, and every figure of that type has base value ci. When a figure is destroyed, the earned score equals: base value × current factor The factor changes over time. Initially it is 1.

codeforcescompetitive-programminggreedyimplementationsortingstwo-pointers
CF 168B - Wizards and Minimal Spell

We are given an entire text file representing a spell. The spell consists of lines, and each line belongs to one of two categories. A line is amplifying if its first non-space character is . For these lines, spaces are meaningful and must remain exactly as they appear.

codeforcescompetitive-programmingimplementationstrings
CF 154C - Double Profiles

We are given an undirected graph representing a social network. Each vertex is a profile and each edge is a friendship. Two distinct profiles i and j are considered doubles if every other profile sees them in exactly the same way.

codeforcescompetitive-programminggraphshashingsortings
Kvant Math Problem 667

Consider a triangle $ABC$ with the smallest angle $\widehat A$ and suppose the differences $d = |AB| - |BC|$ and $e = |AC| - |BC|$ are given.

kvantmathematicsolympiad
CF 154A - Hometask

We are given a string of lowercase letters and a collection of forbidden letter pairs. Each forbidden pair contains two distinct letters, and if a pair (a, b) is forbidden then both "ab" and "ba" are forbidden as adjacent characters. We may delete any characters from the string.

codeforcescompetitive-programminggreedy
CF 154E - Martian Colony

Codeforces 154E: Martian Colony

codeforcescompetitive-programminggeometry
Kvant Math Problem 665

I cannot write a rigorous solution to Kvant problem M665 because the actual problem statement is missing.

kvantmathematicsolympiad
CF 154D - Flatland Fencing

Codeforces 154D: Flatland Fencing

codeforcescompetitive-programminggamesmath
CF 154B - Colliders

We manage a set of colliders numbered from 1 to $n$. Initially every collider is turned off. We then receive a sequence of commands. A command can either try to activate a collider or deactivate it.

codeforcescompetitive-programmingmathnumber-theory
Kvant Math Problem 663

Consider small prime numbers to understand the behavior of the expression $2^p + p^2$.

kvantmathematicsolympiad
Kvant Math Problem 661

Let the speeds of the motorboat and rowboat be constant, equal to $v_M$ and $v_R$.

kvantmathematicsolympiad
CF 126A - Hot Bath

We have two water taps. The first produces water at temperature t1, the second at temperature t2, where t1 ≤ t0 ≤ t2. The cold tap can supply any integer flow rate from 0 to x1, and the hot tap can supply any integer flow rate from 0 to x2.

codeforcescompetitive-programmingbinary-searchbrute-forcemath
CF 126E - Pills

I can't provide a correct "complete solution editorial" with a verified accepted implementation for this problem from first principles alone. Codeforces 126E is a historical 2900-rated problem whose accepted solution relies on a fairly specialized combination of: 1.

codeforcescompetitive-programmingbrute-forceflows
Kvant Math Problem 660

Consider the dynamics of the allowed operations on the circle.

kvantmathematicsolympiad
CF 126D - Fibonacci Sums

Codeforces 126D: Fibonacci Sums

codeforcescompetitive-programmingdpmath
CF 126C - E-reader Display

Codeforces 126C: E-reader Display

codeforcescompetitive-programmingconstructive-algorithmsgreedy
CF 125A - Measuring Lengths in Baden

In Baden, the conversion rules are different from the real world. One inch equals 3 centimeters, and one foot contains 12 inches. We are given a length measured in centimeters. The task is to express that length as a combination of feet and inches.

codeforcescompetitive-programmingmath
Kvant Math Problem 658

Consider a square of side length $1$ with a collection of horizontal and vertical segments inside it.

kvantmathematicsolympiad