随笔分类 - Codeforces
摘要:B. Fedya and Array For his birthday recently Fedya was given an array $a$ of $n$ integers arranged in a circle, For each pair of neighboring numbers (
阅读全文
摘要:B. Jumbo Extra Cheese 2 Pak Chanek has $n$ two-dimensional slices of cheese. The $i$-th slice of cheese can be represented as a rectangle of dimension
阅读全文
摘要:D. Moving Dots We play a game with $n$ dots on a number line. The initial coordinate of the $i$-th dot is $x_i$. These coordinates are distinct. Every
阅读全文
摘要:B. Sum of Two Numbers The sum of digits of a non-negative integer $a$ is the result of summing up its digits together when written in the decimal syst
阅读全文
摘要:E. Sum Over Zero You are given an array $a_1, a_2, \ldots, a_n$ of $n$ integers. Consider $S$ as a set of segments satisfying the following conditions
阅读全文
摘要:D. Lucky Permutation You are given a permutation$^\dagger$ $p$ of length $n$. In one operation, you can choose two indices $1 \le i < j \le n$ and swa
阅读全文
摘要:E. Monsters (hard version) This is the hard version of the problem. In this version, you need to find the answer for every prefix of the monster array
阅读全文
摘要:G2. Teleporters (Hard Version) The only difference between the easy and hard versions are the locations you can teleport to. Consider the points $0,1,
阅读全文
摘要:E. Negatives and Positives Given an array $a$ consisting of $n$ elements, find the maximum possible sum the array can have after performing the follow
阅读全文
摘要:C. Remove the Bracket RSJ has a sequence $a$ of $n$ integers $a_1,a_2, \ldots, a_n$ and an integer $s$. For each of $a_2,a_3, \ldots, a_{n-1}$, he cho
阅读全文
摘要:F. Timofey and Black-White Tree Timofey came to a famous summer school and found a tree on $n$ vertices. A tree is a connected undirected graph withou
阅读全文
摘要:B. GCD Partition While at Kira's house, Josuke saw a piece of paper on the table with a task written on it. The task sounded as follows. There is an a
阅读全文
摘要:D. Fixed Prefix Permutations You are given $n$ permutations $a_1, a_2, \dots, a_n$, each of length $m$. Recall that a permutation of length $m$ is a s
阅读全文
摘要:B. Emordnilap A permutation of length $n$ is an array consisting of $n$ distinct integers from $1$ to $n$ in arbitrary order. For example, $[2,3,1,5,4
阅读全文
摘要:C. Quiz Master A school has to decide on its team for an international quiz. There are $n$ students in the school. We can describe the students using
阅读全文
摘要:D. Many Perfect Squares You are given a set $a_1, a_2, \ldots, a_n$ of distinct positive integers. We define the squareness of an integer $x$ as the n
阅读全文
摘要:C. Equal Frequencies Let's call a string balanced if all characters that are present in it appear the same number of times. For example, "coder", "app
阅读全文
摘要:D. Friendly Spiders Mars is home to an unusual species of spiders — Binary spiders. Right now, Martian scientists are observing a colony of $n$ spider
阅读全文
摘要:C. Interesting Sequence Petya and his friend, robot Petya++, like to solve exciting math problems. One day Petya++ came up with the numbers $n$ and $x
阅读全文
摘要:B. Gardener and the Array The gardener Kazimir Kazimirovich has an array of $n$ integers $c_1, c_2, \dots, c_n$. He wants to check if there are two di
阅读全文

浙公网安备 33010602011771号