摘要:
D. Doremy's Connecting Plan Doremy lives in a country consisting of $n$ cities numbered from $1$ to $n$, with $a_i$ people living in the $i$-th city. 阅读全文
摘要:
E. Segment Sum You are given two integers $l$ and $r$ ($l \le r$). Your task is to calculate the sum of numbers from $l$ to $r$ (including $l$ and $r$ 阅读全文
摘要:
E. Time Travel Berland is a country with ancient history, where roads were built and destroyed for centuries. It is known that there always were $n$ c 阅读全文
摘要:
Minimum Changes to Make K Semi-palindromes Given a string s and an integer k, partition s into k substrings such that the sum of the number of letter 阅读全文
摘要:
D2. Dances (Hard Version) This is the hard version of the problem. The only difference is that in this version $m \leq 10^9$. You are given two arrays 阅读全文
摘要:
B. Raspberries You are given an array of integers $a_1, a_2, \ldots, a_n$ and a number $k$ ($2 \leq k \leq 5$). In one operation, you can do the follo 阅读全文
摘要:
C. Medium Design The array $a_1, a_2, \ldots, a_m$ is initially filled with zeroes. You are given $n$ pairwise distinct segments $1 \le l_i \le r_i \l 阅读全文