brain

tamnd's digital brain — notes, problems, research

43815 notes

LeetCode 3539 - Find Sum of Array Product of Magical Sequences

The expression in the statement should be interpreted as: A sequence seq of length m is magical when the binary representation of this sum contains exactly k set bits. Each element of the sequence is an index into nums. The contribution of an index i is the power of two .

leetcodehardarraymathdynamic-programmingbit-manipulationcombinatoricsbitmask
LeetCode 3555 - Smallest Subarray to Sort in Every Sliding Window

We are given an array nums and a window size k. For every contiguous subarray of length k, we must determine the minimum length of a continuous segment that needs to be sorted so that the entire window becomes non-decreasing.

leetcodemediumarraytwo-pointersstackgreedysortingmonotonic-stack
LeetCode 3550 - Smallest Index With Digit Sum Equal to Index

This problem asks us to find the smallest index i in an integer array nums such that the sum of the digits of nums[i] equals i. In other words, for each element in the array, we compute the sum of its digits and check whether that sum matches the element's index.

leetcodeeasyarraymath
LeetCode 3548 - Equal Sum Grid Partition II

The problem is asking whether a given m x n matrix of positive integers can be split exactly once, either horizontally or vertically, such that the sums of the two resulting sections are equal, or can be made equal by discounting at most one cell.

leetcodehardarrayhash-tablematrixenumerationprefix-sum
LeetCode 3531 - Count Covered Buildings

A single-precision floating point number in MIX, as defined in Section 4.2.1, consists of a sign byte, an exponent field, and a normalized fraction stored in one word.

leetcodemediumarrayhash-tablesorting
CF 1560E - Polycarp and String Transformation

We are given a string t which is generated from some original string s through a specific sequence of operations. Starting with an empty string t, Polycarp repeatedly appends the current s to t and then removes all occurrences of one chosen character from s.

codeforcescompetitive-programmingbinary-searchimplementationsortingsstrings
LeetCode 3537 - Fill a Special Grid

The problem asks us to generate a special 2ⁿ x 2ⁿ grid filled with integers from 0 to 4ⁿ - 1 (note that 22n - 1 in the problem is likely a typo; it should be 4^n - 1) such that certain order constraints between quadrants are satisfied.

leetcodemediumarraydivide-and-conquermatrix
LeetCode 3526 - Range XOR Queries with Subarray Reversals

Here’s a full technical solution guide for LeetCode 3526 - Range XOR Queries with Subarray Reversals following your requested structure and formatting: The problem provides an array nums of integers and a list of queries, where each query can either update a value in the…

leetcodehardarraytreebinary-tree
LeetCode 3522 - Calculate Score After Performing Instructions

This problem asks you to simulate a linear sequence of instructions that can either modify a running score or move the instruction pointer by a specified offset. You are given two arrays, instructions and values, both of size n. Each index i represents an instruction.

leetcodemediumarrayhash-tablestringsimulation
CF 1560A - Dislike of Threes

We are asked to generate a sequence of positive integers that Polycarp "likes." A number is liked if it is not divisible by 3 and does not end with the digit 3. Given an integer $k$, the task is to output the $k$-th number in this sequence.

codeforcescompetitive-programmingimplementation
LeetCode 3520 - Minimum Threshold for Inversion Pairs Count

Program M computes a double-precision product by expanding each normalized operand into high and low halves, forming four partial products, then discarding all terms that lie strictly to the right of the retained word boundary.

leetcodemediumarraybinary-searchbinary-indexed-treesegment-tree
LeetCode 3502 - Minimum Cost to Reach Every Position

You are given an array cost where cost[i] represents how much person i charges if you want to swap places with them while they are in front of you. Initially, you stand at position n, which is the very end of a line containing positions 0 through n.

leetcodeeasyarray
LeetCode 3495 - Minimum Operations to Make Array Elements Zero

This problem asks us to determine the minimum number of operations required to reduce all elements of arrays defined by queries to zero, where each query [l, r] defines an array of consecutive integers from l to r.

leetcodehardarraymathbit-manipulation
CF 1561C - Deep Down Below

We are given a hero facing a sequence of caves. Each cave contains a number of monsters, each with an armor value, and the hero can defeat a monster only if his current power is strictly greater than the monster's armor.

codeforcescompetitive-programmingbinary-searchgreedysortings
LeetCode 3487 - Maximum Unique Subarray Sum After Deletion

The problem asks us to find the maximum sum of a subarray from an integer array nums under two key constraints: all elements in the chosen subarray must be unique, and we are allowed to delete any number of elements (except leaving the array empty) before selecting the subarray.

leetcodeeasyarrayhash-tablegreedy
CF 1562F - Tubular Bells

We are given a hidden permutation of integers that forms a contiguous interval, but the endpoints of that interval are unknown. Each position in the permutation stores a distinct integer, and together they cover every value in some range of length $n$.

codeforcescompetitive-programminginteractivemathnumber-theoryprobabilities
CF 1562D2 - Two Hundred Twenty One (hard version)

We are given a binary sequence where each position has a value either +1 or -1. A query gives a segment of this sequence, and we are allowed to delete elements from that segment.

codeforcescompetitive-programmingdata-structuresmath
LeetCode 3466 - Maximum Coin Collection

The problem describes Mario driving along a two-lane freeway with coins (or tolls) on each mile. The arrays lane1 and lane2 represent the coin values at each mile for each lane. Positive numbers mean Mario collects coins, negative numbers mean Mario loses coins.

leetcodemediumarraydynamic-programming
CF 1562E - Rescue Niwen!

Program M computes a double-precision product by expanding each normalized operand into high and low halves, forming four partial products, then discarding all terms that lie strictly to the right of the retained word boundary.

codeforcescompetitive-programmingdpgreedystring-suffix-structuresstrings
LeetCode 3483 - Unique 3-Digit Even Numbers

Here’s a comprehensive technical guide for LeetCode 3483 following your requested format: The problem asks us to determine the number of distinct three-digit even numbers that can be formed from an array of digits called digits.

leetcodeeasyarrayhash-tablerecursionenumeration
LeetCode 3431 - Minimum Unlocked Indices to Sort Nums

We are given two arrays of equal length: - nums, where every value is either 1, 2, or 3 - locked, where each value is either 0 or 1 The array is considered sortable if we can repeatedly perform certain adjacent swaps until the array becomes sorted in nondecreasing order.

leetcodemediumarrayhash-table
LeetCode 3443 - Maximum Manhattan Distance After K Changes

The input is a string s consisting of the four cardinal directions 'N', 'S', 'E', and 'W'. Starting from the origin (0, 0), we perform the moves one by one in the order given by the string.

leetcodemediumhash-tablemathstringcounting
CF 1562A - The Miracle and the Sleeper

The task asks us to maximize the remainder when one integer divides another, given a range of integers. Specifically, we have two integers, l and r, and we can choose any pair (a, b) such that b is at least l and at most a, and a is at most r.

codeforcescompetitive-programminggreedymath
LeetCode 3434 - Maximum Frequency After Subarray Operation

We are given an array nums and a target value k. We must perform exactly one operation: 1. Choose a contiguous subarray nums[i..j]. 2. Choose an integer x. 3. Add x to every element inside that subarray.

leetcodemediumarrayhash-tabledynamic-programminggreedyenumerationprefix-sum
LeetCode 3025 - Find the Number of Ways to Place People I

The proposed solution does not address the actual content of the TAOCP exercise. The exercise is about constructing and explaining numerical instability in floating point evaluation of algebraically equivalent expressions, but the “solution” instead discusses Python…

leetcodemediumarraymathgeometrysortingenumeration
CF 1562D1 - Two Hundred Twenty One (easy version)

The proposed solution does not address the actual content of the TAOCP exercise. The exercise is about constructing and explaining numerical instability in floating point evaluation of algebraically equivalent expressions, but the “solution” instead discusses Python…

codeforcescompetitive-programmingdata-structuresdpmath
CF 1562B - Scenes From a Memory

We are given a number n without zeros in its decimal representation, and the task is to remove some digits to obtain a number that is not prime, either a composite number or 1. The goal is to remove as many digits as possible while still ensuring the result is not prime.

codeforcescompetitive-programmingbrute-forceconstructive-algorithmsimplementationmathnumber-theory
CF 1562C - Rings

We are given a binary string representing a sequence of rings, where each character is either 0 or 1. Any contiguous segment of this string can be interpreted as a binary number, and its value is obtained in the usual way: reading left to right, shifting previous value by one…

codeforcescompetitive-programmingconstructive-algorithmsmath
LeetCode 3432 - Count Partitions with Even Sum Difference

The problem gives us an integer array nums of length n. We must consider every possible partition point between elements, where the array is split into two non-empty parts. For a partition at index i: - The left subarray is nums[0...i]. - The right subarray is nums[i+1...n-1].

leetcodeeasyarraymathprefix-sum
Kvant Physics Problem 201

The circuit consists of one or more batteries connected to a fixed external resistor.

kvantphysics
LeetCode 3426 - Manhattan Distances of All Arrangements of Pieces

We are given an m × n grid and must place exactly k identical pieces onto distinct cells. Every possible placement of these k pieces is considered a valid arrangement. For a single arrangement, we compute the sum of Manhattan distances between every pair of placed pieces.

leetcodehardmathcombinatorics
LeetCode 3404 - Count Special Subsequences

We are given an array nums of positive integers and need to count how many subsequences of length four satisfy a specific multiplicative relationship.

leetcodemediumarrayhash-tablemathenumeration
LeetCode 3405 - Count the Number of Arrays with K Matching Adjacent Elements

We are given three integers: - n, the length of the array. - m, the number of possible values each element may take, namely integers in the range [1, m]. - k, the exact number of adjacent pairs that must be equal.

leetcodehardmathcombinatorics
CF 1566H - Xor-quiz

We are given a hidden set $A$ of size $n$, where every element is an integer between $1$ and $c$. We can query any value $x$, and the judge responds with a value computed from the elements of $A$: it takes all $y in A$ that are coprime with $x$, and XORs them together.

codeforcescompetitive-programmingconstructive-algorithmsdpinteractivemathnumber-theory
LeetCode 3381 - Maximum Subarray Sum With Length Divisible by K

We are given an integer array nums and an integer k. We must find a contiguous subarray whose length is divisible by k, and among all such valid subarrays, return the maximum possible sum. A subarray is a contiguous segment of the array.

leetcodemediumarrayhash-tableprefix-sum
LeetCode 3313 - Find the Last Marked Nodes in Tree

We are given an undirected tree with n nodes. A tree is a connected graph with exactly n - 1 edges and no cycles. For every node i, we perform the following process: - Node i is marked at time t = 0.

leetcodehardtreedepth-first-search
LeetCode 2933 - High-Access Employees

This problem provides a list of employee access records. Each record contains two pieces of information: - The employee's name. - A timestamp in 24-hour "HHMM" format. All timestamps belong to the same day, so there is no need to handle dates or day transitions.

leetcodemediumarrayhash-tablestringsorting
LeetCode 3191 - Minimum Operations to Make Binary Array Elements Equal to One I

The problem presents a binary array nums of length at least 3, containing only 0s and 1s. The allowed operation is to select any three consecutive elements and flip all of them, meaning each 0 becomes 1 and each 1 becomes 0.

leetcodemediumarraybit-manipulationqueuesliding-windowprefix-sum
LeetCode 1787 - Make the XOR of All Segments Equal to Zero

We are given an array nums and an integer k. Every contiguous segment of length k must have XOR equal to 0 after we perform some modifications to the array. Our goal is to change as few elements as possible.

leetcodehardarrayhash-tabledynamic-programmingbit-manipulationcounting
CF 1566G - Four Vertices

We are working with a weighted undirected graph that changes over time by edge insertions and deletions. After every modification, including the initial state, we must look at all pairs of vertices and imagine the shortest path distance between each pair.

codeforcescompetitive-programmingconstructive-algorithmsdata-structuresgraphsgreedyimplementationshortest-paths
CF 1566C - MAX-MEX Cut

The traceback says: at: So the program is using sys without importing it. This is consistent with the previous correction: we switched to sys.stdin.read() but forgot the required import line: Across previous iterations, there were multiple partial fixes: 1.

codeforcescompetitive-programmingbitmasksconstructive-algorithmsdpgreedy
CF 1566E - Buds Re-hanging

We are given a rooted tree with root at vertex 1. A vertex is a leaf if it has no children. A vertex is a bud if it is not the root, has at least one child, and every one of its children is a leaf.

codeforcescompetitive-programmingconstructive-algorithmsdfs-and-similardpgreedytrees
Kvant Physics Problem 197

A body of mass $m$ lies on a fixed horizontal rough surface.

kvantphysics
CF 1566F - Points Movement

We are given a set of starting positions on a number line, each hosting a point that can move left or right in unit steps, each step costing 1. Alongside this, we are given several closed intervals on the same line.

codeforcescompetitive-programmingdata-structuresdpgreedyimplementationsortings
CF 1566D2 - Seating Arrangements (hard version)

We are tasked with seating nm people in a cinema with n rows and m columns, where the seats in each row are numbered consecutively left to right. Each person has a "sight level," and lower sight levels should get better seats, which are defined as seats with lower indices.

codeforcescompetitive-programmingdata-structuresgreedyimplementationsortingstwo-pointers
CF 1566B - MIN-MEX Cut

We are given a binary string and may split it into any number of contiguous pieces. Every character must belong to exactly one piece. For each piece, we compute its MEX.

codeforcescompetitive-programmingbitmasksconstructive-algorithmsdpgreedy
CF 1566D1 - Seating Arrangements (easy version)

We are given a line of seats in a single row, labeled from left to right in increasing order. There are $m$ seats, and $nm$ people, but since $n = 1$, we only have one row of length $m$ containing exactly $m$ people in total.

codeforcescompetitive-programmingdata-structuresgreedysortings
Kvant Physics Problem 198

A skater moves on horizontal ice with both skate blades in contact with the surface.

kvantphysics
Kvant Physics Problem 193

Two infinite sequences of thin lenses are placed along a common optical axis $z$.

kvantphysics
CF 1566A - Median Maximization

We are asked to determine the largest possible median of an array of n non-negative integers whose sum is exactly s.

codeforcescompetitive-programmingbinary-searchgreedymath
CF 1567B - MEXor Mixup

Ah, I see exactly what went wrong. The traceback shows: This happened because in the test harness we called solve() but in your actual script the function solve wasn’t defined in the global scope or the script wasn’t executed properly inside the harness.

codeforcescompetitive-programmingbitmasksgreedy
Kvant Physics Problem 199

The physical system consists of a neutron entering a layer of material.

kvantphysics
CF 1567F - One-Four Overload

We are given a grid of size $n times m$ where some cells are marked with an X and the rest are unmarked .. The marked cells are never on the boundary of the grid.

codeforcescompetitive-programming2-satconstructive-algorithmsdfs-and-similardsugraphsimplementation
CF 1567E - Non-Decreasing Dilemma

We maintain an array under point updates. After each update, future queries must use the new values. For a query on a segment [l, r], we must count how many subarrays completely inside that range are non-decreasing.

codeforcescompetitive-programmingdata-structuresdivide-and-conquermath
Kvant Physics Problem 187

Consider a thin metal plate of area $s$ coated with a layer of liquid dielectric of density $\rho$ and relative permittivity $\varepsilon$, where the thickness of the layer is much smaller than the li…

kvantphysics
CF 1567D - Expression Evaluation Error

We are given a situation where Bob writes down a sequence of positive integers whose sum is fixed. The only freedom he has is how to split this total sum into exactly n parts.

codeforcescompetitive-programmingconstructive-algorithmsgreedyimplementationmath
CF 1567A - Domino Disaster

We are given a 2-row grid of width $n$ fully covered by $1 times 2$ dominoes. Each domino can be placed either vertically, covering one cell in each row, or horizontally, covering two adjacent cells in the same row.

codeforcescompetitive-programmingimplementationstrings
CF 1567C - Carrying Conundrum

We are asked to count the number of ordered pairs of positive integers (a, b) that produce a specific result n under an unusual addition scheme. In this scheme, instead of carrying to the next column as in standard addition, Alice carries to the column two places to the left.

codeforcescompetitive-programmingbitmaskscombinatoricsdpmath
Kvant Physics Problem 181

A satellite of mass $m$ moves around the Earth of mass $M$ in a nearly circular orbit of radius $r$ with orbital speed $v$.

kvantphysics
CF 1569C - Jury Meeting

We are asked to count the number of permutations of jury members that are “nice,” given how they present their tasks. Each jury member $i$ has $ai$ tasks, and they tell tasks in order according to a permutation.

codeforcescompetitive-programmingcombinatoricsmath
CF 1569F - Palindromic Hamiltonian Path

We are given a small undirected graph with at most 12 vertices. We want to assign each vertex a letter from a fixed alphabet of size k. Every such assignment produces a labeled graph.

codeforcescompetitive-programmingbrute-forcedfs-and-similardpgraphshashing
Kvant Physics Problem 189

A point charge $q = 10^{-8},\text{C}$ is uniformly distributed along a circular arc of radius $R = 1,\text{cm} = 10^{-2},\text{m}$.

kvantphysics
CF 1569E - Playoff Restoration

We are given a single-elimination tournament with $2^k$ teams, where $k$ ranges from 1 to 5. The matches are structured in a fixed bracket: in the first round, consecutive teams play each other, and winners advance to the next round, pairing up according to the same rule until…

codeforcescompetitive-programmingbitmasksbrute-forcehashingimplementationmeet-in-the-middle
CF 1569D - Inconvenient Pairs

We are asked to count the number of "inconvenient pairs" among people located on the streets of a city that is a perfect square grid. Each person is guaranteed to be on either a vertical or a horizontal street, which are given as sorted coordinates.

codeforcescompetitive-programmingbinary-searchdata-structuresimplementationsortingstwo-pointers
Kvant Physics Problem 188

A refrigerator operates for a time interval $\tau$ while consuming electrical power $W$.

kvantphysics
CF 1569A - Balanced Substring

We are given a binary string consisting only of the characters a and b. For each test case, we must find any contiguous segment whose number of a characters is exactly equal to its number of b characters.

codeforcescompetitive-programmingimplementation
Kvant Physics Problem 183

The problem involves a dynamometer sliding along a smooth horizontal table, pulled by a constant horizontal force $F=4~\text{N}$, with the mass of its spring equal to the mass of its casing.

kvantphysics
CF 1569B - Chess Tournament

We are given a group of players where every pair plays a single chess game. For each match, we must decide one of three outcomes: one player wins and the other loses, or both draw.

codeforcescompetitive-programmingconstructive-algorithms
Kvant Physics Problem 186

A passenger of mass $m$ moves along a curved path of radius $R$ with speed $v$ during a turn.

kvantphysics
CF 1571J - Two Railroads

The problem is not a small implementation bug. The entire algorithmic approach is fundamentally wrong. Let's trace the sample that immediately disproves it: The proposed algorithm sees at least one '1', then only checks the first and last characters: - s[0] = ')' → flip needed…

codeforcescompetitive-programming*special
Kvant Physics Problem 178

A cubic vessel of edge length $a = 1~\text{cm} = 10^{-2}~\text{m}$ contains $n$ gas molecules at room temperature.

kvantphysics
Kvant Physics Problem 184

The physical system is a television image transmission channel.

kvantphysics
CF 1571H - Laser Beams

We are given a rectangular game level defined by its width a and height b. Inside the level are n enemies, each at a unique position (xi, yi).

codeforcescompetitive-programming*specialgeometryprobabilities
CF 1571I - Physical Examination

We are given several test cases. Each test case describes a set of doctors, where each doctor is available only during a fixed integer time interval.

codeforcescompetitive-programming*specialbinary-searchdata-structures
CF 1571E - Fix the String

We are given a string of brackets s and a binary string a of length n-3. Each '1' in a imposes a constraint that the corresponding 4-character substring of s must be a valid regular bracket sequence.

codeforcescompetitive-programming*specialbitmasksdpgreedy
CF 1571F - Kotlinforces

We are asked to place a collection of “events,” where each event is not a single day but a whole arithmetic progression of days.

codeforcescompetitive-programming*specialconstructive-algorithmsdp
CF 1571G - A Battle Against a Dragon

Codeforces 1571G: A Battle Against a Dragon

codeforcescompetitive-programming*specialdata-structuresdp
Kvant Physics Problem 182

A person jumps vertically upward from the surface of the Moon.

kvantphysics
CF 1571C - Rhyme

We are given several pairs of strings, each marked either as needing to rhyme or explicitly not rhyming. Two strings rhyme under a positive integer $k$ if their last $k$ characters are identical and each string has length at least $k$.

codeforcescompetitive-programming*specialimplementation
CF 1571D - Sweepstake

We are given a competition with n programmers and a survey of m spectators, each predicting who will finish first and last. You, as the first spectator, have submitted your prediction (f1, l1).

codeforcescompetitive-programming*specialbrute-forceconstructive-algorithmsimplementationmath
Kvant Physics Problem 180

A perfectly conducting isolated metal sphere of radius $R$ is placed in a uniform external electric field of magnitude $E$ directed along a fixed axis.

kvantphysics
CF 1571A - Sequence of Comparisons

We are given a sequence of relational signs between consecutive elements of an array, and we are asked to determine whether we can uniquely infer the relation between the first and the last element.

codeforcescompetitive-programming*special
CF 1572C - Paint

We have a one dimensional image represented by an array of colors. A single operation chooses a connected monochromatic segment and repaints the entire segment to any color. The connectivity definition is slightly unusual.

codeforcescompetitive-programmingdpgreedy
CF 1572F - Stations

We have a row of cities, each of which can host a broadcasting station. Each station has a height and a range. A station can reach cities to its right up to its range limit, but it is blocked by any taller station in between.

codeforcescompetitive-programmingdata-structures
CF 1572D - Bridge Club

We are given a universe of $2^n$ players, where each player is identified by an $n$-bit mask. Each bit represents whether that player has a positive or negative opinion on a topic.

codeforcescompetitive-programmingflowsgraph-matchingsgraphsgreedy
Kvant Physics Problem 177

A stretched string performs small transverse vibrations.

kvantphysics
Kvant Physics Problem 176

The system consists of a rigid tool, such as an awl, nail, or knife, interacting with a deformable material.

kvantphysics
Kvant Physics Problem 179

A submarine moves vertically downward with constant speed $u$ in still water where sound propagates with speed $V$.

kvantphysics
CF 1572B - Xor of 3

We are given a sequence of 0s and 1s and an operation that can change any three consecutive elements to the XOR of those three elements.

codeforcescompetitive-programmingbrute-forceconstructive-algorithmsgreedytwo-pointers
CF 1573A - Countdown

The problem presents a digital clock showing an integer with exactly $n$ digits. Each digit ranges from 0 to 9, and the display includes leading zeroes so the number always has length $n$. The goal is to reduce this number to zero with the fewest possible operations.

codeforcescompetitive-programminggreedy
Kvant Physics Problem 174

An ideal gas containing $n$ moles undergoes a quasistatic thermodynamic process in which the temperature $T$ is prescribed as a function of the volume $V$.

kvantphysics
Kvant Physics Problem 175

Two identical solid elastic spheres of radius $R = 1~\text{cm} = 1.

kvantphysics
CF 1573B - Swaps

We are given two arrays of length $n$, where array $a$ contains all the odd numbers from $1$ to $2n$ in some order, and array $b$ contains all the even numbers from $1$ to $2n$ in some order.

codeforcescompetitive-programminggreedymathsortings
Kvant Physics Problem 166

A horizontal cylinder contains $n=1$ mole of an ideal gas.

kvantphysics
CF 1574C - Slay the Dragon

We have a squad of heroes, each with a fixed strength. For every dragon, we must choose exactly one hero to fight it, while all remaining heroes stay behind to defend the castle. A dragon has two requirements.

codeforcescompetitive-programmingbinary-searchgreedysortingsternary-search
CF 1574F - Occurrences

We are asked to construct a length m array a, where each position can take a value from 1 to k. The twist is that we are given several “pattern arrays” Ai, and these patterns impose constraints on how often they are allowed to appear inside a.

codeforcescompetitive-programmingcombinatoricsdfs-and-similardpdsufftgraphs
CF 1574E - Coloring

We are asked to fill an initially empty $n times m$ matrix with 0s and 1s such that every $2 times 2$ submatrix contains exactly two 0s and two 1s.

codeforcescompetitive-programmingcombinatoricsconstructive-algorithmsimplementationmath
CF 1574D - The Strongest Build

In this problem, we are asked to help Ivan choose the strongest possible hero build from a set of equipment slots, each with multiple items of different strengths. Each slot has its own list of items, already sorted by increasing strength.

codeforcescompetitive-programmingbinary-searchbrute-forcedata-structuresdfs-and-similargraphsgreedyhashingimplementation
CF 1574B - Combinatorics Homework

The proposed solution appears to be a complete and well-explained editorial for Codeforces 1575A, but it does not address Exercise 4.2.2.16 from TAOCP at all.

codeforcescompetitive-programmingcombinatoricsgreedymath
Kvant Physics Problem 173

A solid sphere of radius $R$ carries a uniform volume charge density $\sigma$ with units $\mathrm{C/m^3}$.

kvantphysics